Re:Extreme explorations of TypeScript's type system
by HyperSane on Monday June 27, 2022 @03:07PM
(#31899261)
What are some of the projects have done typing that well?
[ Parent
| on HN ]
Re:Extreme explorations of TypeScript's type system
by sir_pepe on Monday June 27, 2022 @03:19PM
(#31899439)
Not really a "project", but TypeScript's own type definitions for the DOM are a great example. Eg. document.createElement returns different subtypes of HTMLElement depending on the string argument (HTML tag name) it gets called with.
Re:Extreme explorations of TypeScript's type system
by theogravity on Monday June 27, 2022 @03:19PM
(#31899433)
If you're a GraphQL developer, Pothos is the best example - all your user-defined types just fits in it like a glove 99% of the time. It definitely makes the most use of TS generics.
(I'm a bit sleepy, so this is the main one I can think of at the moment that I really enjoy using.)