Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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`.


yup, it's not possible to do it safely with a simple unparameterised type: https://www.typescriptlang.org/play/?#code/C4TwDgpgBAcg9gOwK...




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: