News for hackers. Stuff that matters.
Re:Adding negated and number intrinsic types to TypeScript by esperent on Wednesday November 13, 2024 @05:30PM (#42130908)
> param: string & Not<"">

Is this even a type anymore? It's checking against a specific value.

Re:Adding negated and number intrinsic types to TypeScript by eyelidlessness on Thursday November 14, 2024 @11:47PM (#42144042)
You can specify specific values in TypeScript types already. And you can achieve the effect of this specific type with Exclude over a type parameter already. This is expanding on concepts already in wide use, in a widely used type system.