explaingit

xcatliu/typescript-tutorial

10,723TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

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.

Mindmap

mindmap
  root((typescript-tutorial))
    What it does
      Step-by-step tutorial
      Chinese language
      Beginner friendly
    Audience
      JavaScript developers
      New to TypeScript
    Topics covered
      Type system
      Modern JS features
      Practical patterns
    Tech
      TypeScript
      Pagic static site
    Access
      Online at ts.xcatliu.com
      GitHub source
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Work through TypeScript concepts from scratch if you already know JavaScript.

USE CASE 2

Reference specific TypeScript patterns and type system features while building a project.

USE CASE 3

Contribute corrections or additional examples to help other Chinese-speaking learners.

Tech stack

TypeScriptPagic

Getting it running

Difficulty · easy Time to first run · 5min
Free to read, share, and modify for non-commercial purposes only, with credit to the original author.

In plain English

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.

Copy-paste prompts

Prompt 1
I'm learning TypeScript with a JavaScript background. Explain how TypeScript's type system helps catch bugs before code runs, with a simple example.
Prompt 2
Show me how to declare variable types in TypeScript and how the compiler catches type errors.
Prompt 3
Give me a TypeScript function that accepts a string and a number, and show what happens if I pass the wrong type.
Prompt 4
Explain union types and intersection types in TypeScript with examples I can run.
Open on GitHub → Explain another repo

← xcatliu on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.