~/talk

Enhanced safety with types

Talkat Craft Conference 2022 · 2022-06-02..06-03· [typescript]
slides:none on file

TypeScript code shows how to make impossible states impossible by modeling state instead of using loose booleans: an editable union replaces an editing flag plus buffer so buffer exists only when editing, preventing invalid paths at compile time. For async loads a RemoteData type (NotAsked, Loading, Success, Failure) replaces three booleans — three booleans -> eight states but only four valid — so data only exists in Success. Also mentions decoders/encoders for parsing external JSON.

AI-written summary · about

  1. 0:00Start
  2. 3:15Type Error
  3. 9:11Union Type
  4. 31:11Debugging
  5. 34:26Impact of Failure in Production
  6. 38:53How Would You Handle Data from Outside World
~/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.