TypeScript: Turning Bad Old JS into Typed Code
summary
Practical techniques for using TypeScript to convert untyped JavaScript into well-typed code, covering advanced features such as types, functions, literal types, unions and intersections. The talk presents strategies to avoid casts and any, and to adopt TypeScript idioms that make applications more type-safe and maintainable.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:08TypeScript vs JavaScript
- 2:11Literal types
- 4:41Enums vs literals
- 6:05Deriving types
- 7:29Template string types
- 9:17Union types
- 11:44Type guards
- 17:01Type guards in arrays
- 18:46Assertion functions
- 20:31Branded types
- 24:01Schema validation with Zod
- 27:58Safe parsing with Zod
- 28:41Why TypeScript matters
- 30:49Q&A
