Skip to content
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

Add .allSettled() method #10

Closed
sindresorhus opened this issue Oct 30, 2020 · 4 comments · Fixed by #24
Closed

Add .allSettled() method #10

sindresorhus opened this issue Oct 30, 2020 · 4 comments · Fixed by #24

Comments

@sindresorhus
Copy link
Owner

Like https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled

@Richienb
Copy link
Contributor

Before adding this, is it possible to simplify the types so that .all doesn't require 10 separate definitions?

@sindresorhus
Copy link
Owner Author

That would be nice, but I'm not sure if it's possible. TypeScript did receive variadic tuple support, but not sure if it solves all the same problems or whether it's as type safe.

@privatenumber
Copy link
Contributor

This one is a little more complicated but I think it should be possible. Precedent in p-all: sindresorhus/p-all#9

@Richienb
Copy link
Contributor

Reworking those typings for Iterables like Sets might be a challenge because of how P in keyof Task may yield get, set, has, etc. instead of the indexes we want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants