~/talk

End to end typing for web applications

Talkat rubyday 2023 · on Friday, 2023-06-16· [typescript, web-platform]
slides:none on file

Claim: keep one source of truth for data shapes by writing JSON Schema to TypeScript and generating types used by both Ruby produces and the frontend. Tools: JSON Schema files, generator, TypeScript, optional runtime checks (Zod/JSON Schema assertions), CI step that regenerates and runs the TS compiler. Built: generated type map of API paths and discriminated unions for Action Cable events. Result: incremental rollout over ~six months reaches ~95% frontend in TypeScript and catches mismatches before runtime.

AI-written summary · about

  1. 0:00Introduction
  2. 1:59Frontend-backend type mismatch
  3. 3:02What is TypeScript
  4. 5:54TypeScript features
  5. 7:40TypeScript with React
  6. 9:45Type narrowing
  7. 13:20Untyped external data
  8. 15:31JSON Schema validation
  9. 17:39Ruby and TypeScript bridge
  10. 20:08Generated types in practice
  11. 23:40Organizing TypeScript types
  12. 25:25Eliminating type assertions
  13. 30:46Adoption benefits summary
  14. 31:28Q&A
~/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.