awaitErrors()function
awaitErrors(...promises: PromiseLike<unknown>[]): Promise<ImmutableArray<unknown>>
| Param | Type | |
|---|---|---|
promises | PromiseLike<unknown>[] | Values (usually async, but not necessarily) that we need to wait for. required |
| Return | |
|---|---|
Promise<ImmutableArray<unknown>> | Array of rejection reasons of all promises (or empty array if no promises threw). |
Get the rejection reasons of multiple promises (concurrently).
Examples
const errors = await awaitErrors(getA(), getB());