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
Consider rejecting only on rejected Promises. #8
Comments
What would be the alternative here? If you're going to say, synchronously throwing, that's a no-go, as promises should always reject. I think the solution here is to just better document all the situations it could reject. |
Something like
I guess I am suggesting throwing synchronously, but I would say that the Promise still always resolves or rejects, but the function that returns the Promise can throw. |
I did not know that. Sorry for the bother. |
No worries. I did not know either before that tweet :) |
According to the documentation,
pMap
returnsBut strictly speaking, it's
It's a subtle difference, especially if you're awaiting
pMap
or passing an async function asmapper
.The text was updated successfully, but these errors were encountered: