Type System Game Engines
summary
TypeScript types parse a newline move string into a list of moves, apply each move by constructing new board types and then compute the victor, all purely at compile time. The talk demonstrates concrete implementations using conditional types, keyof and mapped types, type recursion and string template literal types, shows how parsing and number conversion happen with infer, and reports a working Tic Tac Toe type that requires modern TypeScript like 4.1 to succeed.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:22Agenda
- 0:50The End Product
- 1:19The Upside Down
- 1:40TypeScript to JavaScript
- 2:13TypeScript to Type System
- 3:19Conditional Return Types
- 4:20Checking our Types
- 5:50Let's Play a Game
- 6:05How Would You Type This?
- 6:49Type Members
- 8:22Tuple Types
- 8:44Victory Conditions
- 9:13Victory Checking
- 10:13Automated Checking
- 13:11A Different Board Descriptor
- 14:06Board Transitions?
- 14:33Mapped Conditional Types
- 15:50Leveling Up
- 17:40Dynamic Action List Types?
- 17:51Thinking Functionally
- 20:37Type Recursion!
- 22:49Our Last Challenge
- 23:42Our String Parsing Challenge
- 24:21Level Three: Splitting
- 25:27Level Four: Filtering
related talks
44mA Deep Dive Into Advanced Typescript: A Live Coding Expedition
44mA Deep Dive Into Advanced TypeScript - A Live Coding Expedition
43mA Deep Dive into Advanced TypeScript: A Live Coding Expedition
54mThe Fun Side of Advanced TypeScript: An Interactive Coding Session
48mDeep Dive into Advanced TypeScript: A Live Coding Expedition
44mA Deep Dive Into Advanced TypeScript: A Live-Coding Expedition
30mSwipe Left, Uncaught TypeError Learning to Love Type Systems
22mThink you know TypeScript? Think again.
