A no-nonsense guide to all the essentials you’ll need to become a TypeScript wizard and build a TypeScript application from scratch.If you're an experienced JavaScript developer or want to level up your current TypeScript skills, with
Total TypeScript, you'll learn everything you need to build a TypeScript product from scratch.
Based on a series of sold-out workshops, the material in
Total TypeScript has been tested by hundreds of developers to ensure their effectiveness and value. You'll explore useful patterns you can immediately apply in your projects and helpful workarounds for TypeScript’s most common pitfalls. Dozens of exercises throughout range from writing solutions from scratch to advanced typing to debugging, so you'll be prepared for the gotchas that appear in real-world applications.
You'll also learn how to:
- Set up a TypeScript development environment and how to leverage its superpower IDE.
- Add types to functions, arrays, and objects, and make reusable types with type aliases
- Express object types, including index signatures, Records, and interfaces
- Take advantage of classic object-oriented patterns in your code
- Configure TypeScript for any situation and powerful features to design your own types
With this straightforward and approachable guide, you'll go from learning the foundations to a TypeScript wizard equipped to handle any TypeScript project that comes your way with confidence.
A no-nonsense guide to all the essentials you’ll need to become a TypeScript wizard and build a TypeScript application from scratch.
“An invaluable resource to countless developers.”
—Ryan Cavanaugh, Development Lead Microsoft TypeScript Team
TypeScript makes JavaScript safer and your editor smarter. Matt Pocock’s Total TypeScript courses have trained thousands of developers by putting the editor first: You learn types by watching what TypeScript tells you, not by memorizing rules. This book brings that method to print.
You’ll start by setting up a proper TypeScript environment, then immediately begin writing and annotating code. Each chapter builds on the last—primitive types to unions, objects to classes, basic generics to type transformations—with exercises woven throughout as checkpoints, not afterthoughts.
Later chapters tackle what takes longer to learn: deriving types from other types, writing type predicates and assertion functions, configuring the compiler for real projects, and building type architectures that don’t collapse under their own weight.
You’ll learn to:
- Read TypeScript’s error messages and use your editor as a teaching tool
- Write precise types for objects, functions, and classes
- Use unions, narrowing, and generics to make types flexible without losing safety
- Derive and transform types so you don’t repeat yourself
- Configure tsconfig.json for React, Node, or library development
This is a workshop in print. The one Matt Pocock has been refining for years.