Array.prototype.includes
should be narrow on union of enum types instead of throwing
#49906
Closed
5 tasks done
Labels
Duplicate
An existing issue was already created
Suggestion
🔍 Search Terms
includes
,enum
(#46085 is relevant but not what this is discussing)✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
Array.prototype.includes
should be able to narrow down on a union of enum types instead of throwing:📃 Motivating Example
💻 Use Cases
Allowing checks on something that could be possibly one of multiple enums.
The text was updated successfully, but these errors were encountered: