Tech
Advanced TypeScript: type-driven design
Make the compiler work for you: model your domain so that invalid states can't be represented.
- Indicative duration
- 2 to 3 days
- Level
- Intermediate
- Delivery
- On-site · Remote · Hybrid
- Formats
- In-house
- Open session
- Intensive bootcamp
- Talk / masterclass
Expected outcomes for your teams and business
What the training concretely changes, beyond the classroom:
-
Fewer bugs reaching production
Whole classes of errors are caught by the compiler instead of by your users.
-
Faster, safer changes
The compiler guides every refactoring, so teams evolve the code with confidence instead of fear.
-
Quicker onboarding
Types document the domain and its rules: newcomers understand the codebase and contribute sooner.
-
Lower maintenance cost
Less defensive code and fewer runtime checks to write, test and maintain.
Learning objectives
By the end of the course, participants will be able to:
- Read and write advanced types (generics, conditional, mapped and template literal types) with confidence
- Model a business domain so that invalid states are unrepresentable
- Use branded types to secure primitive values (identifiers, amounts, emails)
- Represent errors as values and make failure paths explicit in signatures
- Design type-safe APIs that are pleasant to consume
- Diagnose and simplify complex types and compiler errors
Audience
- Developers already using TypeScript daily
- Tech leads and architects defining a team's TypeScript practices
Prerequisites
- At least 6 months of hands-on TypeScript or JavaScript experience
- Familiarity with npm and a modern editor (VS Code or equivalent)
Programme
-
Module 1 Type system foundations, revisited
- Structural typing and its consequences
- Type inference, widening and narrowing
- unknown vs any, and never as a tool
- The strict mode flags that matter
-
Module 2 Generics and type-level programming
- Generic constraints and defaults
- Conditional types and infer
- Mapped types and key remapping
- Template literal types
-
Module 3 Type-driven design
- Making invalid states unrepresentable
- Discriminated unions and exhaustiveness
- Branded types and smart constructors
- Parse, don't validate
-
Module 4 Errors as values
- The limits of exceptions in TypeScript
- Result / Either style modelling
- Typed error channels at boundaries
- An introduction to Effect for going further
-
Module 5 Type-safe APIs and boundaries
- Validating external data at runtime with schemas
- Designing ergonomic module and library APIs
- Sharing types between backend and frontend
- Keeping type complexity and compile times under control
Teaching approach
Around 70% hands-on. Each module alternates short concept sessions, live coding and exercises of increasing difficulty, starting from realistic code rather than toy examples. Participants leave with the exercises, their solutions and the slides.
Tailored to your context
Before the session, a short call helps me understand your stack, your codebase and your team’s level. Exercises can then be built on your own code, and the balance between modules adjusted to what matters most for you. In masterclass format, the content focuses on type-driven design and errors as values.
Let's talk about your needs
A programme to adapt, a team to train, a question about a format? Write to me and let’s discuss.
Get in touchantoinecoulon.consulting@gmail.com