Takes an array of tasks and returns a promise that resolves after all of the given tasks have either fulfilled or rejected, with an array of objects that each describes the outcome of each task.
Cancellable configuration options.
The tasks to execute.
A cancellable handle that resolves with an array of outcome objects for each task.
const handle = allSettled( {}, async () => 1, async () => { throw new Error("boom"); },);const result = await handle;// [// { status: "fulfilled", value: 1 },// { status: "rejected", reason: Error("boom") }// ] Copy
const handle = allSettled( {}, async () => 1, async () => { throw new Error("boom"); },);const result = await handle;// [// { status: "fulfilled", value: 1 },// { status: "rejected", reason: Error("boom") }// ]
Takes an array of tasks and returns a promise that resolves after all of the given tasks have either fulfilled or rejected, with an array of objects that each describes the outcome of each task.