Type Sharing between Nuxt and Hono
We have a Monorepo with a Nuxt 3 frontend and a Hono backend.
Now we are unsure on what's the best approach to type our API calls.
Our API request look something like this currently
SurveyResponse is currently a manually typed interface in the frontend, and we want to have this type inference automatically
how would you integrate something like the hono/client with this?
we thought about a composable like this
but afaik hono/client is not SSR-friendly yet?
We wouldn't be reluctant to something like a separate API Types package which'd had to be built manually, but we are unsure about how to approach this with Hono.
I hope someone can help with this as there isn't any helpful information on this out there.
Now we are unsure on what's the best approach to type our API calls.
Our API request look something like this currently
SurveyResponse is currently a manually typed interface in the frontend, and we want to have this type inference automatically
how would you integrate something like the hono/client with this?
we thought about a composable like this
but afaik hono/client is not SSR-friendly yet?
We wouldn't be reluctant to something like a separate API Types package which'd had to be built manually, but we are unsure about how to approach this with Hono.
I hope someone can help with this as there isn't any helpful information on this out there.