~/talk

Type-level Programming ƒun in TypeScript

Talkat React Alicante 2019 · 2019-09-26..09-28· [typescript, large-language-models]

Type-level programming in TypeScript shows how to turn URL strings into exact response types and make fetch return Promise<CorrectType> instead of any, using string literal unions, keyof and indexed access types, conditional types and generic type aliases. Examples include a typed fetch mapping URLs to response types, a type-level finite state machine that yields editor autocomplete, boolean-logic gates and Peano-style type numerals with recursive type-level loops. Everything emits zero JavaScript, it improves compile-time errors and IDE suggestions, but it remains brittle across TypeScript version changes.

AI-written summary · about

  1. 0:00The role of types
  2. 3:57Compilation vs. runtime
  3. 7:18Refining type safety
  4. 11:53Introduction to type-level
  5. 17:12Advanced type mapping
  6. 25:26Type-level state machines
  7. 29:52Logic and recursion at types
~/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.