wyrd
Why does .openapi(route, handler) return unknown type in client.ts when using OpenAPIHono?
I’m new to Hono and trying out @hono/zod-openapi for the first time.
Im trying out the RPC feature with client.ts
I noticed that when I define my routes like this
client is type unkown
But when I chain the .openapi(...) calls like this:
the types are inferred correctly in client.ts.
Why is there a difference? Is this expected behavior with OpenAPIHono, or am I missing something in how route types are collected?
Here is my full code
https://pastebin.com/dyeYHung
17 replies