Beginning TypeScript Programming
Beginning TypeScript Programming
Summary:
Introduction
The book "Beginning TypeScript Programming" by Greg Lim was published in 2021 and quickly gained popularity among those who want to learn TypeScript from scratch. This is not another syntax reference, but a practical guide that will take the reader from the very basics to creating a full-fledged web application. Just 198 pages — and you are already writing typed code, understanding interfaces, generics, and modules. The book is ideal for those familiar with JavaScript but wanting to switch to a more reliable and scalable language.
What the book is about
Greg Lim builds the learning around a real project — a task management application (Todo App). Each chapter adds new functionality, simultaneously introducing the reader to key TypeScript concepts. The book covers:
- installing and configuring the environment (Node.js, tsc compiler, tsconfig.json);
- basic types: number, string, boolean, arrays, tuples, enums;
- interfaces and custom types;
- classes, access modifiers, inheritance;
- generics (generic programming);
- modules and code organization;
- working with the DOM and events in a typed style;
- basics of decorators (brief overview).
Each topic is accompanied by small examples and exercises that reinforce the material. At the end of the book, you get a ready-made application that you can further develop on your own.
Who this book is for
The book is intended for beginner developers who already have basic knowledge of JavaScript (variables, functions, objects, arrays) and want to learn TypeScript. It will also be useful for those transitioning from other statically typed languages (C#, Java) and wanting to quickly master TypeScript in the context of web development. Experienced programmers familiar with TypeScript are unlikely to find anything new here — the book is aimed specifically at the "from scratch" level.
What the reader will learn
After reading the book, you will be able to:
- set up a TypeScript project from scratch;
- declare types for variables, functions, objects;
- create interfaces and custom types to describe complex data structures;
- use classes and inheritance with typing;
- apply generics to create flexible and reusable components;
- split code into modules and manage dependencies;
- work with DOM elements using strict typing;
- understand how the TypeScript compiler helps avoid errors at the development stage.
Strengths
The main advantage of the book is its practical focus. You don't just read theory, but immediately apply it in practice by creating a real application. This helps you quickly remember the syntax and understand why typing is needed. Another plus is its small size. The book is not overloaded with unnecessary details; each chapter solves a specific problem. The author writes in a simple and clear language, explaining complex concepts with examples. It is also worth noting its relevance: the book was published in 2021 and covers modern TypeScript features (for example, decorators, albeit briefly).
Who it is recommended for
I recommend this book to anyone who wants to quickly and painlessly enter the world of TypeScript. It is especially suitable for:
- frontend developers who use JavaScript and want to increase the reliability of their code;
- students and beginner programmers who have already mastered the basics of JavaScript;
- developers from other languages wishing to get acquainted with TypeScript for web projects;
- anyone looking for a short but comprehensive introduction to TypeScript without unnecessary theory.
If you already write confidently in TypeScript or are looking for an in-depth reference on advanced topics (conditional types, mapped types, conditional types), this book is not for you. But for a start — it is one of the best options.