~/talk

A Deep Dive Into Advanced Typescript: A Live Coding Expedition

Talkat Voxxed Days Ticino 2024 · on Friday, 2024-01-19· [typescript]
links:none on file
slides:none on file

Live coding shows concrete TypeScript tricks: use map types and template literal types to generate onAdd/onRemove handlers and chessboard keys, validate RGB strings at compile time with patterned template literals, and combine gap/margin permutations into optional CSS maps. Use never-based exhaustive checks to force compile-time coverage and a NoEmptyString type to reject "" inputs. Use infer plus recursion to extract return types and build readonly tuples of arbitrary length (practical limit ~999). A types-only arithmetic validator is on GitHub; numeric-range checks remain impractical. WID plugin helps inspect inferred results.

AI-written summary · about

  1. 0:00Advanced TypeScript intro
  2. 1:03Map types and template literals
  3. 10:21Never type explained
  4. 19:07Type extraction with infer
  5. 21:58Recursion in TypeScript types
  6. 30:08Branded types for validation
  7. 36:34Calculator with advanced types
  8. 37:59Q&A
~/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.