TypeScript Tips 2: Branded Types
2 min readMay 9, 2023
Welcome to my series ‘TypeScript Tips’. I’m sharing some lesser-known language features, design patterns, and coding advice to make you more effective whilst working with TS.
What are branded types?
Branded types (also known as nominal types) are types you can construct from a base type that are distinct from that base type despite working the same: