-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Allow array of > 10 values in argument of Promise.all() and Promise.race() #22469
Comments
This is almost a dupe of this as a subset of that bug (and an already-known one). |
@isiahmeadows I feel like I'm being slow...but what does |
It's still a WIP feature (no set-in-stone syntax), but there are a few experimental PRs. There's a couple different concept implementations of |
@isiahmeadows Cheers. My initial "Ctrl-F" attempts didn't expand into the collapsed comments so I missed |
@isiahmeadows I completely agree, #5453 would appear to completely solve this problem, should it be accepted. I should point out though, that while #5453 would be a complete/permanent solution, there is much more consideration that it must be given before being officially rolled out. In the meantime, lib.es2015.promise.d.ts could be extended using the pattern it already uses today - which could be accomplished in minutes - let's say to support ~20 items instead of ~10 - as a short term gap-stop while #5453 goes through the standard process of being reviewed/implemented/released. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
Currently, Promise.all() and Promise.race() both have signatures like this:
While this is suitable in most cases, occasionally there is a need (or preference) to wait on the retrieval of several (10+) dependencies and then access them all within a single block.
Workarounds for Promise.all() certainly exist (i.e. splitting into multiple Promise.all() calls) - but code can become unnecessarily complex. Workarounds for Promise.race() are not as easy.
Since actual implementations of Promise.all() and Promise.race() are boundless, it would be helpful if lib.es2015.promise.d.ts reflected a wider range of plausible use cases.
Proposed solution:
Add overloads to lib.es2015.promise.d.ts - using the pattern it already uses today - to support ~20 items instead of ~10.
The text was updated successfully, but these errors were encountered: