gitmyhub

typescript-book

JavaScript ★ 10k updated 26d ago

The Concise TypeScript Book: A Concise Guide to Effective Development in TypeScript. Free and Open Source.

A free, open-source written guide to TypeScript covering everything from the basics through advanced type system features, available as a README, EPUB download, and website, with community translations in four languages.

TypeScriptJavaScriptsetup: easycomplexity 1/5

The Concise TypeScript Book is a free, open-source written guide that covers the TypeScript programming language from introduction through advanced topics. The entire book lives in this repository as a single README file, and is also available as a downloadable EPUB and as a website. Community members have translated it into Chinese, Italian, Portuguese, and Swedish.

TypeScript is a language built on top of JavaScript that adds a type system: a way for developers to declare what kind of data a variable holds, and have the tooling check that those declarations are respected before the code runs. This book explains how that type system works, why it exists, and how to use it effectively.

Coverage spans the full language. Early chapters explain what TypeScript is, how it relates to JavaScript, and how to configure a TypeScript project. The bulk of the book works through the type system in depth: primitive types, type inference, type narrowing, union and intersection types, mapped types, conditional types, template literal types, and the special types any, unknown, void, and never. There are also chapters on interfaces and type aliases, enums, classes with access modifiers, generics, decorators, modules, and utility types.

Later sections address practical topics such as migrating an existing JavaScript project to TypeScript, working with declaration files, and handling common interop patterns with JavaScript libraries. The table of contents is extensive, making it useful as both a learning path for beginners and a reference for developers who already know the basics but need to look up a specific feature.

The project is open to contributions and the author accepts optional donations. The full README is longer than what was shown.

Where it fits