Understanding TypeScript's Structural Type System
summary
Claims that TypeScript is a structural type system not nominal, that it runs as an NPM package plus compiler and language server, and that teams use it at maximum strictness to catch bugs before runtime. Shows concrete tools and techniques: discriminated unions, control-flow–based type analysis, mapped types and generics (Partial lives in lib), and a Taipings-style tester. Demonstrates real wins: statically eliminated translation and permission bugs and practical adoption across web, mobile and API projects.
AI-written summary · about
chapters (9)
- 0:00Start
- 2:21What is a static type system?
- 5:52TypeScript Basics
- 7:39Structural Typing
- 10:19Sum Types (F#)
- 11:36TypeScript Sum Types
- 18:40Discriminated Unions
- 23:45Substitutability
- 25:20Generics are Functions
related talks
24mTypeScript for JavaScripties
01h 01mDeconstructing TypeScript’s Type System
24mTypeScript: Static types for JavaScript
01h 05mBusy TypeScript Developer’s Guide to Advanced TypeScript
54mTypescript for the busy Java developer
31mTypeScript for JavaScripties
40mTypeScript: State of the Union
57mTypeScript : More than just another JS transpiler
