~/talk

The long-tail of type safety

Talkat App.js Conf 2023 · 2023-05-10..05-12· [typescript, developer-experience]
links:none on file
slides:none on file

TypeScript is not sound by default — mutating a string[] into a (string|number)[] or calling JSON.parse (which returns any) can still produce runtime errors — so enable noUncheckedIndexedAccess and strict mode, add ESLint rules to ban unsafe escapes, and replace global defs with ts-reset or override JSON.parse to return unknown. Validate I/O with schema libraries like Zod (safeParse forces handling) and generate types or use tRPC/GraphQL for end-to-end safety; these approaches prove practical and reduce runtime exceptions.

AI-written summary · about

  1. 0:00Introduction to type safety
  2. 1:04TypeScript’s unsound design
  3. 3:13Where TypeScript falls short
  4. 4:38Stricter TypeScript config
  5. 6:25Linting for type safety
  6. 8:10Fixing global type definitions
  7. 10:37Handling I/O boundaries
  8. 13:06Schema-based validation
  9. 15:33Fetching with type safety
  10. 16:36Routing and navigation types
  11. 19:25Long-tail of type safety
~/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.