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

docs(collection): document overloads (revert #3818) #3823

Merged
merged 2 commits into from Nov 21, 2023

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Nov 21, 2023

#3818 removed overloads from several functions, but they seemed useful. Now these functions accept selectors of mixed return types such as maxBy(arr, (item) => item === null ? 10 : "foo") and what happens with these calls are not obvious (also not documented). I think we shouldn't allow these calls.

This PR instead documents all overloads of these functions towards #3764

Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit 8e52ea8 into denoland:main Nov 21, 2023
12 checks passed
@kt3k kt3k deleted the revert-3818 branch November 21, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants