You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like a Promise utility that acts a little like allSettled in that it allows all Promises in a given array of Promises to resolve or reject, but the end result is a rejected Promise if any Promise in the array is rejected.
But that implementation loses the values that resolved Promises returned and only surfaces a single reason for rejection when there could be multiple.
Perhaps the function could resolve with the array of resolved values if all Promises resolve, and reject with an array of rejection reasons for any rejected Promises (or just reject with the array of results so that resolved values are not lost).
The text was updated successfully, but these errors were encountered:
We would like a Promise utility that acts a little like
allSettled
in that it allows all Promises in a given array of Promises to resolve or reject, but the end result is a rejected Promise if any Promise in the array is rejected.This simplest implementation of this would be:
But that implementation loses the values that resolved Promises returned and only surfaces a single reason for rejection when there could be multiple.
Perhaps the function could resolve with the array of resolved values if all Promises resolve, and reject with an array of rejection reasons for any rejected Promises (or just reject with the array of results so that resolved values are not lost).
The text was updated successfully, but these errors were encountered: