You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Union of array literal types has uncallable methodsΒ #62645
This is working as intended. When calling a method on a union, your parameters become an intersection. The first parameter of ["en"].includes() is typed "en", and of ["en-GB"].includes() it's typed "en-GB". The intersection "en" & "en-GB" results in never.
π€ Thank you for your issue! I've done some analysis to help get you started. This response is automatically generated; feel free to π or π this comment according to its usefulness.
Activity
MartinJohns commentedon Oct 21, 2025
This is working as intended. When calling a method on a union, your parameters become an intersection. The first parameter of
["en"].includes()is typed"en", and of["en-GB"].includes()it's typed"en-GB". The intersection"en" & "en-GB"results innever.This is another duplicate of #26255 / #14520.
RyanCavanaugh commentedon Oct 22, 2025
π€ Thank you for your issue! I've done some analysis to help get you started. This response is automatically generated; feel free to π or π this comment according to its usefulness.
Similar Issues
Here are the most similar issues I found
If your issue is a duplicate of one of these, feel free to close this issue. Otherwise, no action is needed.
typescript-bot commentedon Oct 25, 2025
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.