Hacker News new | ask | show | jobs
by HyperSane 1460 days ago
What are some of the projects have done typing that well?
3 comments

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

https://pothos-graphql.dev/

(I'm a bit sleepy, so this is the main one I can think of at the moment that I really enjoy using.)

purify-ts is my favourite currently.