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

Reject reduce#complete with a RangeError in favor of TypeError #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maraisr
Copy link
Collaborator

@maraisr maraisr commented Dec 9, 2024

What Im proposing to merge could swing either way, so opening this more up as a point of discussion and if we agree, lets merge.

For our first and last promise-returning operators, if there were no values produced by the time the complete handlers fire, we reject with a RangeError. But here, with reduce the spec wants a TypeError.

Should we keep consistency, and have the spec want a RangeError? I understand there is an extra clause in that there was no initial value either.

Thoughts?


Preview | Diff

@maraisr maraisr changed the title Reject reduce complete with a RangeError Reject reduce#complete with a RangeError in favor of TypeError Dec 9, 2024
@maraisr
Copy link
Collaborator Author

maraisr commented Dec 10, 2024

cc @domfarolino

@domfarolino
Copy link
Collaborator

Thanks a lot. Honestly I don't feel very strongly here, but I vaguely recall @benlesh being more interested in the decisions around RangeErrors here. Ben, can I ask for your opinion on this?

@maraisr maraisr requested a review from benlesh December 17, 2024 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants