spion/branded-types
View on GitHub ↗ ★ 14 TypeScript
Nice branded types for TypeScript
3 mentions on Hacker News by 1 person: 0 stories, 3 comments · first 2020-01-31 · latest 2022-03-21
20082026
-
I tried to solve this problem in a way that's reasonably pleasant here https://github.com/spion/branded-types
comment by spion · 2022-03-21 · in Please put units in names -
…thing about a type system is that it can properly track whether you need to do that or not (see https://github.com/spion/branded-types for one TS technique on how to do that)
comment by spion · 2020-07-23 · in Svelte and TypeScript -
You can hide some of your structure using "private". There are also branded types: https://github.com/spion/branded-types
comment by spion · 2020-01-31 · in TypeScript’s quirks: How inconsistencies make the language more complex