~/talk

Lies We Tell Ourselves Using TypeScript v2

Talkat React+TS fwdays'23 · 2023-10-17..10-21· [typescript]
slides:none on file

A concise demo shows a fetch from the Star Wars API that compiles yet throws at runtime, exposing how TypeScript is intentionally not provably sound. Ten lines of code produce four distinct bugs — bad fetch typings via res.json, unsafe catch handling, function-overload mismatch, and mutation that widens types when appendEntries mutates a list. Fixes use declaration merging, unknown in catch variables, generics and conditional types, which mitigate each failure but introduce their own trade-offs and hazards.

AI-written summary · about

  1. 0:00Introduction
  2. 0:55Im terribly sorry
  3. 2:11The code
  4. 5:03A Tale of Fetch
  5. 5:56TypeScript at its Boundaries
  6. 6:36Unsafe Operations
  7. 9:22Error Handling
  8. 10:53Unknown to the Rescue
  9. 11:31Function Overloads
  10. 17:48Generics
  11. 19:08Summary
  12. 20:53More Lies
  13. 24:59Epilog
~/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.