- PromiseRace<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>
-
Parameters
-
values: Iterable<T | PromiseLike<T>>
Returns Promise<Awaited<T>>
- PromiseRace<T>(values: T): Promise<Awaited<T[number]>>
-
Type Parameters
-
T extends [] | readonly unknown[]
Returns Promise<Awaited<T[number]>>
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
Returns
A new Promise.