TypeScript Professional — Medium
Key points
- Branded types prevent accidental interchangeability of shapes
- Intersection with a unique symbol or string literal creates a distinct type
- Nominal typing is achieved through this pattern
- Helps enforce stricter type checking in TypeScript
Ready to go further?
Related questions
