Ondřej Chrastina
Menu
Extreme TypeScript: a Compile-Time Calculator, Step by Step

Extreme TypeScript: a Compile-Time Calculator, Step by Step

The companion repository for my \"Extreme TypeScript\" talks: learn conditional types, infer, template literal types, and recursion by building a calculator that computes entirely at compile time.

Back to projects
Released: Mon Jan 12 2026
  • Source Code

What's inside

A guided learning path through TypeScript's type system: conditional types and pattern matching, the infer keyword, template literal types, tuple spreads, and recursive type definitions - combined step by step until the type checker itself does arithmetic. Each step lives in the learning/ directory with links to the official docs.

Why it exists

Talks fade, repositories stay. This is the hands-on half of my \"Extreme TypeScript: Mastering Recursion and Inference via Type-Level Arithmetic\" talk, so you can replay every trick at your own pace and argue with the compiler directly.

Resources

  • Repository on GitHub
  • The talk this repo was built for
  • Twitter
  • GitHub
  • LinkedIn
  • Facebook
  • Instagram
  • YouTube
  • Medium
  • dev.to
  • Discord
    • © Ondřej Chrastina 2020–2026
    • Original Design: HTML5 UP
    • 💾 Source code - use GitHub issues for feedback 🙌
  • I am | Home
  • I write | Journal
  • I Code | Projects
  • I speak | Talks
  • PWA series
  • GitHub
Close