5 ms·
Or better, Promise.reject
by Bahamut 11y ago
Or better, Promise.reject
- loganfsmyth 11y agoBoth are useful, but I'd hesitate to call it better. What makes you say it is better?
- Bahamut 11y agoIt makes explicit that the intention that a promise should be rejected, as opposed to a throw where one might reasonably expect an exception of some sort.