入门
TypeScript
TypeScript 就是在 JavaScript 之上加了一层类型系统。本课程从零讲起,覆盖类型、interface、generic、class、模块、工具类型、mapped/conditional 类型、声明文件以及编译器配置。
18 节7.7h 实操11 种语言
免费开始学习TypeScript 课程共 18 节,按顺序
- 120 分钟
你好,TypeScript
What TypeScript isTsc compile stepRunning a .ts fileThe play button - 225 分钟
类型基础
Primitive typesStringNumberBooleanNullUndefined+3 - 325 分钟
数组与 Tuple
Array typesReadonly arraysTuple typesFixed-length tuplesNamed tuple elements - 425 分钟
对象类型与 Interface
Object literal typesInterface keywordRequired vs optional propertiesStructural typingExcess property checks - 525 分钟
函数
Parameter typesReturn typesVoid returnDefault parametersRest parametersFunction type expressions+1 - 625 分钟
Union 与 Literal 类型
Union typesString literal typesNumeric literal typesLiteral narrowing with as constUnion of object shapes - 730 分钟
类型 Narrowing
Typeof narrowingTruthiness narrowingEquality narrowingIn operator narrowingInstanceof narrowingDiscriminated unions+1 - 820 分钟
Type Alias vs Interface
Type aliasesInterface declarationsExtending interfacesIntersection typesDeclaration mergingWhen to pick which - 925 分钟
Optional、Readonly 与 Nullable
Optional propertiesReadonly propertiesNon-null assertion operatorOptional chainingNullish coalescingStrictNullChecks - 1020 分钟
Enum
Numeric enumsString enumsConst enumsEnums vs string literal unionsReverse mapping caveats - 1130 分钟
Generic
Generic functionsGeneric interfacesType parametersType inference for genericsBounded generics with extendsDefault type parameters - 1225 分钟
Class
Class declarationsConstructorsInstance propertiesAccess modifiers (public, private, protected)Readonly fieldsParameter properties+1 - 1325 分钟
继承与 Abstract Class
Extends keywordSuper callsMethod overrideAbstract classesAbstract methodsImplements with interface - 1425 分钟
模块
ES module syntaxNamed exportsDefault exportType-only importsRe-exportsModule resolution basics - 1530 分钟
工具类型
Partial<T>Required<T>Readonly<T>Pick<T, K>Omit<T, K>Record<K, V>+2 - 1630 分钟
Mapped 与 Conditional 类型
Keyof operatorMapped types syntaxKey remapping with asConditional typesInfer keywordDistributive conditional types - 1725 分钟
声明文件与第三方库
.d.ts filesDefinitelyTyped (@types packages)Ambient declarationsDeclare moduleTypeRoots and types option - 1830 分钟
tsconfig 与编译器
Tsconfig.jsonStrict modeTarget and libModule and moduleResolutionOutDir and rootDirIncremental and watch+1
用你的语言学习 TypeScript
每一节课、测验和导师回复都以你的语言显示。AI 导师会用你提问的语言来回答。
Learn TypeScript in EnglishAprende TypeScript en españolAprenda TypeScript em portuguêsتعلّم TypeScript بالعربيةTypeScript را به فارسی یاد بگیریدApprenez TypeScript en françaisTypeScript हिन्दी में सीखें用中文学习 TypeScriptPelajari TypeScript dalam bahasa IndonesiaИзучайте TypeScript на русскомTypeScript auf Deutsch lernen
