Skip to content

rename generic parameters in Exclude<> #2192

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

Merged
merged 1 commit into from
Jan 3, 2022
Merged

rename generic parameters in Exclude<> #2192

merged 1 commit into from
Jan 3, 2022

Conversation

NiloCK
Copy link
Contributor

@NiloCK NiloCK commented Dec 18, 2021

A PR bourne of my own confusion. see: microsoft/TypeScript#47178

I believed that Exclude<> was capable of, eg, type not0 = Exclude< number, 0 >. When I found this was not the case, I guessed from the examples that Exclude works on union types, which seems more or less correct.

Very open to better or more correct namings here, but I think Type as the first parameter is particularly misleading - Type reads very clearly to me as any type, but Exclude does not work on any type.

making the capabilities / limitations of `Exclude<>` more obvious.

see: microsoft/TypeScript#47178
@orta
Copy link
Contributor

orta commented Jan 3, 2022

Thanks 👍🏻

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