TypeScript Quickly
TypeScript Quickly
Summary:
Introduction
The book «TypeScript Quickly» (original title — TypeScript Quickly) was published in 2020 and immediately took a worthy place among educational materials on TypeScript. The authors — Yakov Fain and Anton Moiseev — are experienced developers and authors of many books on Java, JavaScript, and Angular. They set themselves an ambitious goal: in a short time (literally «quickly») to teach the reader not only the syntax of TypeScript, but also practical techniques for working with it in real projects.
The book is 416 pages long and covers both basic and advanced topics. It does not try to be an encyclopedia — rather, it is a structured course that guides the reader from installing tools to creating a full-fledged application. On the educational portal PythonLib, we often receive questions about which book to start learning TypeScript with. This review will help you understand if this textbook is right for you.
What this book is about
The book consists of 16 chapters divided into three parts. The first part is devoted to the basics: types, interfaces, classes, functions, generics. The second part delves into advanced concepts: decorators, utility types, working with asynchrony, modules, and namespaces. The third part contains practical examples: creating a simple application in Angular and React, as well as integrating TypeScript with Node.js.
Special attention is paid to the type system. The authors explain in detail how TypeScript helps avoid errors at the compilation stage, how type inference, type guards, and conditional types work. Issues of configuring the compiler (tsconfig.json) and integration with existing JavaScript projects are also covered.
Who this book is for
The book is aimed at JavaScript developers who want to switch to TypeScript or deepen their knowledge. It is assumed that the reader is already familiar with the basics of JavaScript (ES6+): variables, functions, objects, promises. If you are just starting your journey in programming, this book may seem difficult — it is better to first master basic JavaScript.
The book will also be useful for those who already use TypeScript but want to systematize their knowledge and learn about advanced features such as decorators, mapped types, or conditional types. Developers working with Angular, React, or Node.js will find practical integration examples in the book.
What the reader will learn
- TypeScript basics: installation, tsconfig setup, basic types, interfaces, classes, functions.
- Advanced typing: generics, conditional types, mapped types, utility types (Partial, Required, Pick, etc.).
- Decorators: how to create and apply decorators for classes, methods, properties, and parameters.
- Asynchrony: working with promises, async/await, typing asynchronous functions.
- Modules and namespaces: code organization, import/export, module resolution.
- Integration with frameworks: creating a simple application in Angular and React using TypeScript.
- Node.js and TypeScript: setting up a server project, working with Express, typing the environment.
- Testing: writing tests using TypeScript (using Jest as an example).
Strengths of the book
The first thing that stands out is the clear structure. Each chapter begins with a problem statement and ends with a summary and self-test questions. This allows you to use the book as a textbook for self-study or as a reference for review.
The second is the practical focus. The authors do not just list the language features, but show how to apply them in real scenarios. For example, the chapter on decorators is accompanied by an example of creating a simple DI container, and the chapter on generics — by implementing a universal sorting function.
The third is relevance.