Skip to content

Implement type narrowing for Array.prototype.includes #58988

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

Closed
wants to merge 3 commits into from
Closed

Implement type narrowing for Array.prototype.includes #58988

wants to merge 3 commits into from

Conversation

jrandolf
Copy link

@jrandolf jrandolf commented Jun 24, 2024

This PR implements type narrowing for Array.prototype.includes.

Issue: #58989

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jun 24, 2024
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@jrandolf jrandolf changed the title Relax search element in Array.prototype.includes Implement type narrowing for Array.prototype.includes Jun 24, 2024
@MartinJohns
Copy link
Contributor

This approach has been rejected before already: #53904 (comment)

The proposed signature allows any argument, which we consider to be too loose

@jrandolf jrandolf closed this Jun 24, 2024
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants