~/talk

Typing correctly matters

Talkat dotJS 2019 · 2019-12-05..12-06· [typescript, developer-experience]
github:ziadbizri
slides:none on file

Guidelines emphasize concrete techniques: prefer TypeScript inference over manual annotations, replace optional fields with union types and discriminated unions, and use an assertNever helper so adding a new case fails compilation. For untrusted input generate and validate with JSON Schema to get runtime checks and exact typings, and wrap database rows with ES6 proxies that throw on undefined fields so the declared row type matches queried columns. These practices catch mismatches that types alone miss.

AI-written summary · about

  1. 0:00Start
  2. 0:14Typescript types are statically checked constraints
  3. 1:58Use discriminated unions
  4. 3:00Adding runtime checks
  5. 4:06Leverage Typescript's ability to infer
~/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.