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)
- Compile-time types vs runtime validation
- Everyday TypeScript utility types quick reference
- unknown vs any vs never
- Part 1: TypeScript Fundamentals and Configuration
- The TypeScript Guide
- Understanding tsconfig.json
- Build and publish a TypeScript package to npm
- Part 2: Runtime Schema Validation with Zod
- How to use Zod with TypeScript: validate data and infer types
- Part 3: Advanced Generics, Narrowing, and Gradual Migration
- Discriminated unions and exhaustive never checks
- Generics with constraints (extends and keyof)
- Common TypeScript compiler errors decoded
- Migrating an existing JavaScript project to TypeScript
- 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.