Promise.allSettled
Less than 1 minute
Promise.allSettled
Types
interface PromiseConstructor {
allSettled<T>(
iterable: Iterable<Promise<T>>
): Promise<PromiseSettledResult<T>>;
}
type PromiseSettledFulfilledResult<T> = {
status: "fulfilled";
value: T;
};
type PromiseSettledRejectedResult = {
status: "rejected";
reason: any;
};
type PromiseSettledResult<T> =
| PromiseSettledFulfilledResult<T>
| PromiseSettledRejectedResult;
Entry points
core-js/proposals/promise-all-settled