Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
Adding negated and number intrinsic types to TypeScript | Better HN
Adding negated and number intrinsic types to TypeScript
(opens in new tab)
(kaleidawave.github.io)
2 points
kaleidawave
1y ago
2 comments
Share
2 comments
default
newest
oldest
esperent
1y ago
> param: string & Not<"">
Is this even a type anymore? It's checking against a specific value.
eyelidlessness
1y ago
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.
1 more reply
j
/
k
navigate · click thread line to collapse