Skip to content

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