Safer TypeScript
summary
Shows concrete TypeScript tricks and working utilities: uses TypeScript 4.8+ lowercase on string to reject uppercased literals, demonstrates inference prioritization by inferring options before value (fixes a green vs red|yellow bug) and uses intersection with {} to make non‑nullable instead of NonNullable. Builds an includes type guard for readonly tuples, Values and FilterPropertyByType utilities, a hex validator and coordinate generator using recursive template literal types, and exploits tail recursion to produce ranges up to ~1000 numbers that actually compile and catch bad inputs.
AI-written summary · about
chapters (9)
- 0:00Safer TypeScript intro
- 6:52Undocumented TypeScript features
- 10:07Filter object properties by type
- 13:03Immutable arrays with includes
- 17:04Interfaces safer than types
- 21:47Recursive data structures
- 24:53String patterns in templates
- 28:51Hex color validation
- 37:59Summary
related talks
44mA Deep Dive Into Advanced Typescript: A Live Coding Expedition
43mA Deep Dive into Advanced TypeScript: A Live Coding Expedition
01h 01mAdvanced TypeScript Type Utilities
54mAdvanced TypeScript
48mDeep Dive into Advanced TypeScript: A Live Coding Expedition
44mA Deep Dive Into Advanced TypeScript - A Live Coding Expedition
59mA Deep Dive into Advanced TypeScript: A Live Coding Expedition
52mTypescript Deep Dive
