Effective TypeScript: 83 Specific Ways to Improve Your TypeScript, 2nd Edition
Best for: Developers who already write TypeScript regularly but keep reaching for `any` or fighting the type checker, and want specific, itemized fixes.
- ISBN-13: 9781098155063
- Level: intermediate
- Published: 2024
Following the format popularized by Effective Java, this book is 83 independent, numbered items rather than a linear narrative — each one names a specific mistake or missed opportunity and walks through it with real code. The second edition, updated for TypeScript 5, adds two new chapters on type-level programming and a set of ready-to-use recipes, which pushes the book further into territory that used to require a separate advanced reference.
Its best material is on structural typing and type design: items on why
TypeScript’s structural type system produces surprising assignability
results, and a standout chapter on modeling a domain with types instead of
comments and runtime checks — using discriminated unions and never to
make illegal states genuinely unrepresentable rather than just
discouraged. Because each item is self-contained, it’s also unusually easy
to hand a single item to a teammate mid-code-review as a concrete
explanation of “why not any here.”
The item-based format is also its main limitation as a first book: it is not a teaching text and assumes real fluency with generics, interfaces, and union types already. A reader who is still learning what a generic parameter is will find several items opaque, since the book is aimed at correcting habits, not building foundational understanding from zero.
Compared to Learning TypeScript: read Learning TypeScript first if the type system itself is new to you. Come back to Effective TypeScript once you have a working codebase and want a systematic pass through the mistakes that got past the compiler anyway.