TLDR Web Dev · OPINIONS & ADVICE
A DIFFERENT WAY TO THINK ABOUT TYPESCRIPT
Summary from the TLDR Web Dev newsletter
This post proposes a new way to understand TypeScript's type system. It suggests thinking of types as sets of possible values they can construct. This means a string type represents the infinite set of all possible character permutations, and a number type represents the infinite set of all possible digit permutations. TypeScript's features like intersection, union, and type introspection can be understood as operations on these sets.