TypeScript: Gradual, Structural, Dynamic, Static
summary
Builds a TypeScript type layer over an Express-style API that compiles and flags real bugs: typos in param names, wrong HTTP methods, and invalid status numbers. Uses generic types and string template literal types to infer route parameters and pipe them into Request/Response shapes, and enumerates status codes 100β599 (about 500 explicit values) so calls autocomplete and fail fast. The example types are recursive, practical, and work against plain JavaScript runtime code.
AI-written summary Β· about
chapters (8)
- 0:00Introduction and setup
- 3:00Analyzing the API
- 5:12Defining strong types
- 9:11Refining with literal types
- 13:18Utilizing generics
- 17:17Advanced template literals
- 21:59Advanced parameter parsing
- 27:00Conclusion and wrap-up
related talks
24mTypeScript: Static types for JavaScript
01h 11mTypeScript: Static types for JavaScript
30mTypeScript: Seeing Past the Hype
31mTypeScript for JavaScripties
35mTypeScript Gymnastics: Why Are They So Powerful for You?
19mHow Typed is Your Framework?
33mTypeScript for APIs
38mUnderstanding TypeScript's Structural Type System
