~/talk

Lies We Tell Ourselves Using TypeScript

Talkat JetBrains JavaScript Day 2023 · on Thursday, 2023-11-02· [typescript]
slides:none on file

Fetch from SWAPI is typed as any so JSON results silently crash unless explicitly validated; replacing any with unknown and enabling useUnknownInCatchVariables forces runtime checks. Declared function overloads lie because the hidden implementation signature isn’t checked against public overloads, letting code return the wrong variant. Mutation via pass-by-reference breaks naive unions; adding generics ties the list to a concrete element type. Patches like declaration merging, conditional types and assertions work but create new blind spots and complexity.

AI-written summary · about

  1. 0:00Welcome
  2. 1:12TypeScript’s runtime dangers
  3. 4:22Fetch and unsafe types
  4. 10:26Error handling pitfalls
  5. 13:56Function overload pitfalls
  6. 17:49Unexpected mutations
  7. 20:00Four solutions
  8. 24:13Why TypeScript is worth it
~/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.