Reliable I/O with the TypeScript Compiler API
summary
Generates fully typed HTTP clients from TypeScript Compiler API plus OpenAPI specs, claims to eliminate manual fetch functions and surface backend changes as compile errors, and runs generation in CI to publish up‑to‑date packages. Shows codegen of typed functions, React‑Query/SWR hooks and optional runtime validators (examples use React Query and Zod), demonstrates generating pages per endpoint and printing AST nodes to files, and reports that the generated clients integrate with server rendering and catch many bugs before runtime.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:27TypeScript Compiler API for IO
- 1:30React data fetching evolution
- 5:24Early data fetching limits
- 7:53OpenAPI for API contracts
- 9:41Reliable IO client features
- 10:43Client generation methods
- 12:49Code gen with TypeScript API
- 15:17Understanding AST
- 17:03Generating code with factory
- 18:51Simplifying AST tools
- 19:55Printing generated code
- 20:15CI automation for code gen
- 21:18Benefits of generated clients
- 21:59Adding caching and validation
- 23:05UI pages from OpenAPI specs
- 23:47Conclusion
related talks
34mGenerating Types without climbing a tree
45mType-Safe APIs - Syncing Back & Front End Types w/ Code Generation
33mTypeScript for APIs
30mUsing Hooks and Codegen
12mThe Next Generation of GraphQL and TypeScript
27mWeb applications of the future with TypeScript and GraphQL
06mAutomagic TypeScript Codegen for GraphQL
39mEnd to end typing for web applications
