Resolves when at least amount Promises have resolved with an array of the resolved values in the order that they resolved.
Rejects if enough input Promises rejected that the promise can no longer resolve. Still pending Promises become cancelled if they have no more consumers.
Promise.any
Promise.some with 1 amount, except resolved value is value directly instead of an array with one element. This is different than Promise.race, because Promise.race rejects if any input rejects, but Promise.any will only reject if all input promises reject.
Promise.some(array<Promise>, amount)
Resolves when at least
amount
Promises have resolved with an array of the resolved values in the order that they resolved.Rejects if enough input Promises rejected that the promise can no longer resolve. Still pending Promises become cancelled if they have no more consumers.
Promise.any
Promise.some
with 1amount
, except resolved value is value directly instead of an array with one element. This is different than Promise.race, because Promise.race rejects if any input rejects, but Promise.any will only reject if all input promises reject.