Skip to main content

Promise.allSettled

Less than 1 minutefeaturees-proposalmissing-example

Promise.allSettledopen in new window

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