Building Robust Client Libraries for Your Application: A Type-Safe Journey
any
types, runtime errors, and debugging sessions that feel like archaeological digs. Sounds familiar? I’ve been there too – and I found a way out!
types.ts
):endpoints.ts
):base-api.ts
):types.ts
file that defines every endpoint’s inputs/outputs
endpoints.ts
file that maps URLs to your types
createApiInstance
function (you can steal mine from GitHub)
any
again