~/talk

Safer TypeScript

Talkat Conf42 JavaScript 2022 · on Thursday, 2022-11-17· [typescript]
slides:none on file

Shows concrete TypeScript tricks and working utilities: uses TypeScript 4.8+ lowercase on string to reject uppercased literals, demonstrates inference prioritization by inferring options before value (fixes a green vs red|yellow bug) and uses intersection with {} to make non‑nullable instead of NonNullable. Builds an includes type guard for readonly tuples, Values and FilterPropertyByType utilities, a hex validator and coordinate generator using recursive template literal types, and exploits tail recursion to produce ranges up to ~1000 numbers that actually compile and catch bad inputs.

AI-written summary · about

  1. 0:00Safer TypeScript intro
  2. 6:52Undocumented TypeScript features
  3. 10:07Filter object properties by type
  4. 13:03Immutable arrays with includes
  5. 17:04Interfaces safer than types
  6. 21:47Recursive data structures
  7. 24:53String patterns in templates
  8. 28:51Hex color validation
  9. 37:59Summary
~/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.