~/talk

Pattern mayhem: a binary tree in types

TalkinRussianat HolyJS 2025 Autumn · 2025-11-20..11-21· [typescript]
links:none on file
slides:none on file

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

  1. 0:00Welcome
  2. 1:25Binary tree in types
  3. 3:10TypeScript unions/intersections
  4. 5:58Binary search tree
  5. 8:48Arithmetic with array length
  6. 14:27Type-level addition/subtraction
  7. 20:29Tail recursion optimization
  8. 26:54Recursive array building
  9. 27:20Binary tree structure
  10. 31:32Array midpoint
  11. 35:06Array slice functions
  12. 42:20Tree from array
  13. 46:35Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.