Code Quality TypeScript Patterns That Make Your Code Safer Practical TypeScript patterns that make your code safer, from discriminated unions to branded types, with real-world examples. Gareth Clubb · 25 Feb 2026 · 7 min read