Beginner
TypeScript
Learn TypeScript end to end. Types, interfaces, generics, classes, modules, utility and mapped types, declaration files, and the compiler.
18 lessons7.7h hands-on11 languages
Start learning freeTypeScript course18 lessons, in order
- 120 min
Hello, TypeScript
What TypeScript isTsc compile stepRunning a .ts fileThe play button - 225 min
Type Basics
Primitive typesStringNumberBooleanNullUndefined+3 - 325 min
Arrays and Tuples
Array typesReadonly arraysTuple typesFixed-length tuplesNamed tuple elements - 425 min
Object Types and Interfaces
Object literal typesInterface keywordRequired vs optional propertiesStructural typingExcess property checks - 525 min
Functions
Parameter typesReturn typesVoid returnDefault parametersRest parametersFunction type expressions+1 - 625 min
Union and Literal Types
Union typesString literal typesNumeric literal typesLiteral narrowing with as constUnion of object shapes - 730 min
Type Narrowing
Typeof narrowingTruthiness narrowingEquality narrowingIn operator narrowingInstanceof narrowingDiscriminated unions+1 - 820 min
Type Aliases vs Interfaces
Type aliasesInterface declarationsExtending interfacesIntersection typesDeclaration mergingWhen to pick which - 925 min
Optional, Readonly, and Nullable
Optional propertiesReadonly propertiesNon-null assertion operatorOptional chainingNullish coalescingStrictNullChecks - 1020 min
Enums
Numeric enumsString enumsConst enumsEnums vs string literal unionsReverse mapping caveats - 1130 min
Generics
Generic functionsGeneric interfacesType parametersType inference for genericsBounded generics with extendsDefault type parameters - 1225 min
Classes
Class declarationsConstructorsInstance propertiesAccess modifiers (public, private, protected)Readonly fieldsParameter properties+1 - 1325 min
Inheritance and Abstract Classes
Extends keywordSuper callsMethod overrideAbstract classesAbstract methodsImplements with interface - 1425 min
Modules
ES module syntaxNamed exportsDefault exportType-only importsRe-exportsModule resolution basics - 1530 min
Utility Types
Partial<T>Required<T>Readonly<T>Pick<T, K>Omit<T, K>Record<K, V>+2 - 1630 min
Mapped and Conditional Types
Keyof operatorMapped types syntaxKey remapping with asConditional typesInfer keywordDistributive conditional types - 1725 min
Declaration Files and Libraries
.d.ts filesDefinitelyTyped (@types packages)Ambient declarationsDeclare moduleTypeRoots and types option - 1830 min
tsconfig and the Compiler
Tsconfig.jsonStrict modeTarget and libModule and moduleResolutionOutDir and rootDirIncremental and watch+1
Learn TypeScript in your language
Every lesson, quiz, and tutor reply renders in your language. The AI tutor matches the language you ask in.
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
