JavaScript with syntax for types. a tool that runs before your code runs (static) and ensures that the types of the program are correct (typechecked).

TypeScript Deep Dive

TypeScript RoadMap

为 JavaScript 程序员准备的 TypeScript

基础

1. TypeScript能做什么

2. TypeScript编译器 - tsc

类型

3. 常见类型

4. 类型注释

5. 类型别名与接口

6. 类型断言 - Type Assertions

7. 字面量类型 - Literal Types

8. null 和 undefined 检查

枚举类型

泛型

Narrowing

Narrowing是指缩小变量类型的范围,从而使编译器能够更精确地了解该变量的类型。TypeScript不仅包含了类型检查,还了解 if/else 分支、三元表达式、循环等可能会影响类型的各个结构流

9. 类型守卫 - Type Guard

10. 真值收窄 - Truthiness narrowing