StaticallLike PromiseConstructor.all, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
Like PromiseConstructor.all, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
Like PromiseConstructor.all, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
StaticallLike PromiseConstructor.allSettled, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
Like PromiseConstructor.allSettled, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
Like PromiseConstructor.allSettled, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
StaticanyLike PromiseConstructor.any, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
A new Promise.
Like PromiseConstructor.any, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
Like PromiseConstructor.any, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
StaticraceLike PromiseConstructor.race, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
Like PromiseConstructor.race, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
Like PromiseConstructor.race, with an optional abort signal as the first argument.
When a signal is provided, the returned promise is rejected with signal.reason if the signal is aborted before
the returned promise settles.
StaticsleepReturns a promise that resolves after the given duration.
If a signal is provided and is aborted before the duration has elapsed,
then the promise is rejected with signal.reason.
the duration to wait in milliseconds
Returns a promise that resolves after the given duration.
If a signal is provided and is aborted before the duration has elapsed,
then the promise is rejected with signal.reason.
the duration to wait in milliseconds
StaticwithWraps a promise with an abort signal.
If the signal is aborted before the promise settles, then the returns promise is rejected with signal.reason.
Otherwise, it settles in the same way as the original promise.
If no signal is provided then the original promise is returned unchanged.
A Promise that can be rejected by an abort signal.
When a signal is provided, the promise is rejected with
signal.reasonif the signal is aborted before the executor resolves or rejects the promise.The executor may return a cleanup callback, which is invoked when the executor calls
resolveorreject, or when the signal aborts it.The
resolvedargument passed to the cleanup callback istruewhen the executor calledresolve, andfalseotherwise.Example