typescript-tutorial
TypeScript 入门教程
A step-by-step TypeScript tutorial in Chinese for JavaScript developers, covering the type system and modern JS features in a beginner-friendly reading order.
This repository is a TypeScript tutorial written in Chinese, aimed at JavaScript developers who want to learn TypeScript from the ground up. TypeScript is a language that builds on JavaScript by adding a type system, which means you declare what kind of data a variable holds, and the compiler can catch mistakes before your code runs. The tutorial was created by an author who wanted a more beginner-friendly path than the official documentation provides.
The official TypeScript handbook is thorough but organized as a reference: it covers each concept in depth, which means early chapters often refer to things explained later. For someone learning TypeScript for the first time, that can make the reading order confusing. This tutorial takes a different approach, moving step by step through concepts in the order a JavaScript programmer would naturally encounter them.
The content is available to read online at ts.xcatliu.com and the source lives in this GitHub repository. The tutorial was built using a static site generator called Pagic, also by the same author. Readers can leave comments on individual pages and contribute corrections or improvements via pull requests.
The intended audience is someone already comfortable with JavaScript who wants to add TypeScript to their skills. The tutorial is not designed for people brand new to programming or for developers who already use TypeScript fluently. Topics include the type system, support for modern JavaScript features, and practical patterns for writing TypeScript code.
The tutorial is published under a Creative Commons license that allows free reading, sharing, and modification as long as the original author is credited and the use is non-commercial.
Where it fits
- Work through TypeScript concepts from scratch if you already know JavaScript.
- Reference specific TypeScript patterns and type system features while building a project.
- Contribute corrections or additional examples to help other Chinese-speaking learners.