TypeScript: JavaScript with types
Catch mistakes before your code runs. Types, interfaces, generics, narrowing and the advanced types used in large apps.
Start the track- Type annotations IntermediateTell TypeScript what kind of value each variable holds, and let it catch mistakes for you.7 min
- Typed functions IntermediateGive parameters and return values types, and use optional and default parameters.8 min
- Arrays and tuples IntermediateType lists of values, and fixed-length tuples where each position has its own type.8 min
- Objects and interfaces IntermediateDescribe the shape of objects with interfaces, with optional and read-only properties.9 min
- Union types and narrowing IntermediateAccept more than one type, and let TypeScript follow your checks to know which one you have.9 min
- Literal types and type aliases IntermediateAllow only specific values, name your own types, and make the compiler check every case.9 min
- Generics AdvancedWrite one function that works with any type while keeping full type safety.11 min
- Classes and access modifiers AdvancedBuild classes with private state, read-only fields and generic types, and make them implement interfaces.11 min
- Discriminated unions AdvancedModel data that comes in several shapes, and have the compiler prove you handled them all.12 min
- Utility types AdvancedDerive new types from existing ones with Partial, Pick, Omit, Readonly and Record.11 min
- keyof, mapped and conditional types ExpertWrite types that compute other types, the way libraries type their APIs.15 min