-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[node] add AbortSignal.any()
#65782
base: master
Are you sure you want to change the base?
[node] add AbortSignal.any()
#65782
Conversation
Hi @eps1lon @peterblazejewicz 🙂 |
f014fbf
to
53f3412
Compare
// @ts-expect-error | ||
AbortSignal.any(); | ||
// @ts-expect-error | ||
AbortSignal.any(null); | ||
// @ts-expect-error | ||
AbortSignal.any(undefined); | ||
// @ts-expect-error | ||
AbortSignal.any([] as number[]); | ||
AbortSignal.any([]); // $ExpectType AbortSignal | ||
AbortSignal.any([new AbortController().signal]); // $ExpectType AbortSignal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be broken since types lack in https://github.com/microsoft/TypeScript/blob/d027e9619fb8ca964df3885a536a67b5f813738b/src/lib/dom.generated.d.ts#L2319-L2326
@jakebailey this can be closed |
Why? I don't see this function in the current package. |
My bad, I saw something else. Should I create a PR to supersede this? |
I don't really know anything about this PR, so I have no clue. |
types/node/ts4.8/globals.d.ts
Outdated
* @since v20.3.0 | ||
* @param signals The `AbortSignal`s of which to compose a new `AbortSignal`. | ||
*/ | ||
any(signals: AbortSignal[]): AbortSignal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any(signals: AbortSignal[]): AbortSignal; | |
any(signals: readonly AbortSignal[]): AbortSignal; |
Any updates? |
@Resetand unfortunately the |
Opened an issue on TypeScript repo: microsoft/TypeScript#58026 |
53f3412
to
feaf0ff
Compare
With TS 5.5 out, I think this can be revived? |
Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition: