~/talk

Generating Types without climbing a tree

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

Claim: generate TypeScript types and a minimal JS client straight from OpenAPI without manipulating the AST. Uses the tiny code-block-writer library and plain fetch, splits types and code so JavaScript builds stay dependency-free, and intentionally does no runtime validation on the client. Demo shows a generated client, build(url).getMovies()/createMovie(), compiles and runs against a local server, and replaces a slow TypeScript compiler API approach under a tight release deadline.

AI-written summary · about

  1. 0:00Introduction
  2. 0:43Personal journey
  3. 2:51TypeScript in 2022
  4. 4:37API client duplication
  5. 6:45Tight coupling risks
  6. 8:12Requirements for generation
  7. 9:54TypeScript compiler challenges
  8. 11:19code-block-writer library
  9. 12:45Client generator explained
  10. 13:52Live demo
  11. 20:23Q&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.