If your codebase mixes quick wins with long-term risk—any creeping in, APIs hard to evolve, PRs stuck on edge cases, this workshop is for you. We'll move from “types as documentation” to “types as constraints,” refactoring a small project step by step so you can copy the patterns straight into your production code.
What attendees will learn
- Replace
any with safe boundaries - Model workflows with discriminated unions + exhaustive checks
- Add domain safety with branded types
- Design ergonomic, constrained generics without over-engineering
- Validate inputs at runtime to keep types and data in sync
- Patterns for a typed API layer
Requirements (technical & knowledge)
- Laptop with Node 20+, npm, Git, and your favourite IDE
- GitHub account (to clone the starter repo)
- Intermediate JavaScript/TypeScript familiarity (functions, modules, basic generics)
Workshop agenda
- Setup & repo tour
- Type boundaries:
unknown + simple guards - Discriminated unions & exhaustive checks
- Branded types
- Typed API layer + runtime validation
- Safer generics, recap, Q&A
Companies using this technology
Microsoft, Google, Stripe, Shopify, Airbnb, Netflix, Uber, Slack, and many others
Target audience roles
Frontend and full-stack engineers, Node.js developers, tech leads and anyone maintaining medium–large JS/TS codebases.