Skip to content

TypeScript Handbook

TypeScript can feel frustrating at first when the compiler yells at working JavaScript or types turn into unreadable walls of angle brackets.

This handbook teaches you practical TypeScript from the ground up. You will learn how to get real safety and great editor autocomplete with clean, readable types, validate untrusted API data at runtime, and migrate existing JavaScript step by step.

Table of contents (15 chapters)
  1. Compile-time types vs runtime validation
  2. Everyday TypeScript utility types quick reference
  3. unknown vs any vs never
  4. Part 1: TypeScript Fundamentals and Configuration
  5. The TypeScript Guide
  6. Understanding tsconfig.json
  7. Build and publish a TypeScript package to npm
  8. Part 2: Runtime Schema Validation with Zod
  9. How to use Zod with TypeScript: validate data and infer types
  10. Part 3: Advanced Generics, Narrowing, and Gradual Migration
  11. Discriminated unions and exhaustive never checks
  12. Generics with constraints (extends and keyof)
  13. Common TypeScript compiler errors decoded
  14. Migrating an existing JavaScript project to TypeScript
  15. Mapped Types and Template Literal Types

Get the TypeScript Handbook for free: subscribe to my newsletter and I'll send it your way, together with all my other free programming ebooks.

Want the whole collection? See all my free ebooks.

By subscribing you agree to receive my newsletter (new tutorials, book releases, and courses). You can unsubscribe anytime from the link at the bottom of every email. Your email is the only data collected, stored securely in the EU, and never shared.