Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
antipurist
· 5mo ago · 0 comments
It's simple, and it doesn't work as `Exclude` only applies to union types. For type `string` it just returns the same type `string`.
Comments
[–]
phpnode
5mo ago
yup, it's not possible to do it safely with a simple unparameterised type:
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAcg9gOwK...