TypeScript: from JavaScript to safer apps
8 steps · about 3 h 50 min · Intermediate
- See what TypeScript adds (doc, TypeScript, 15 min)
Start with the language's purpose and its relationship to JavaScript.
- Type a small JavaScript program (tutorial, TypeScript, 20 min)
Use inference and annotations in a compact working example.
- Use everyday types (doc, TypeScript, 35 min)
Practise arrays, objects, unions and function signatures.
- Narrow uncertain values (doc, TypeScript, 35 min)
Turn runtime checks into safe compile-time knowledge.
- Design typed functions (doc, TypeScript, 35 min)
Express parameters, callbacks, overloads and return values clearly.
- Reuse types with generics (doc, TypeScript, 35 min)
Preserve relationships between inputs and outputs without using any.
- Organise code into modules (doc, TypeScript, 25 min)
Connect typed files using modern import and export patterns.
- Configure a strict project (reference, TypeScript, 30 min)
Choose compiler options that catch mistakes early and fit the runtime.