from all members: - accepted / - tried
Promise.any() takes an iterable of Promise objects and, as soon as one of the promises in the iterable fulfils, returns a single promise that resolves with the value from that promise
- from MDN
Can you implement a
any() to work the same as
AggregateError is not supported in Chrome yet, but you can still use it in your code since we will add the Class into your code. Do something like following:
new AggregateError( 'No Promise in Promise.any was resolved', errors )
Let's try to solve this problem within 10 mintues.