Pattern mayhem: a binary tree in types
summary
Shows how to implement a binary tree entirely in the TypeScript type system, using TypeScript’s type-level features rather than runtime code. Focus is on demonstrating advanced, surprising capabilities of TypeScript types rather than solving a practical problem.
AI-written summary · about
chapters (13)
- 0:00Welcome
- 1:25Binary tree in types
- 3:10TypeScript unions/intersections
- 5:58Binary search tree
- 8:48Arithmetic with array length
- 14:27Type-level addition/subtraction
- 20:29Tail recursion optimization
- 26:54Recursive array building
- 27:20Binary tree structure
- 31:32Array midpoint
- 35:06Array slice functions
- 42:20Tree from array
- 46:35Summary
related talks
44mA Deep Dive Into Advanced TypeScript - A Live Coding Expedition
01h 04mAdvanced Types in TypeScript
52mTypescript Deep Dive
01h 05mBusy TypeScript Developer’s Guide to Advanced TypeScript
51mTypeScript - Beyond the Basics
01h 01mAdvanced TypeScript Type Utilities
52mTrees that Grow
33mPurifying Typescript
