3 ms·
Author here. Most build tools for end-to-end typesafe APIs rely on code generation, notably OpenAPI and GraphQL. Codegen works, but it inevitably introduces lag
by colinmcd 5y ago
Author here. Most build tools for end-to-end typesafe APIs rely on code generation, notably OpenAPI and GraphQL. Codegen works, but it inevitably introduces lag and friction into the developer workflow. The fact that modern TypeScript makes it easy and safe to share type signatures between any two TypeScript projects is majorly underdiscussed and underutilized. I think some sort of "TypeScript-native" typesafe API library[0] is inevitable as a growing fraction of web projects are fullstack TypeScript. Excited to see how this all pans out!
[0] https://trpc.io/ https://trpc.io/