Issue with Type Errors when Exporting Routes with ActionCtx result.
When I export the route, imported types from
_generated
default to any
. Adding Promise<Response>
to the lambda or using zValidator
for the response resolves type errors. Regardless of abstracting logic or stringifying results, this type error persists. Unsure of the cause, it seems specific to returning values from the action context. My goal Hono Documentation on API Routing and RPC Client Guide. Any insights appreciated. This is not a big issue because i can use zValidator. I just want to understand.RPC - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
Routing - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
9 Replies
when i dont try to return the result
Actions | Convex Developer Hub
Actions can call third party services to do things such as processing a payment
hmm, i can do this for c.env.runQuery and resolve that but the rest are still here.
ofc i can add Promise<Response> or use zValidator still but its kinda weird
I think annotating the type or using zvalidator is the recommended solution to this type error
That is weird i agree
yeah i honeslty have no idea whats going on here xd
but im going to use zValidator either way
i didnt know if this is a bug or just typescript limitation
just wanted to ask
Yep for sure. This looks similar to what we've seen before, like https://github.com/get-convex/convex-js/issues/3
GitHub
Convex Actions - returning anything from "runQuery" or "runMutation...
When creating the app for the Web Dev Cody's hackathon, I found that returning anything from the ctx.runQuery or ctx.runMutation when using the Convex Actions ends with "circularly referen...
But HonoWithConvex might have a slightly different issue; we can look into it
thanks for taking your time to look at this. i appreciate it.
it seems this type issue doesn't happen with elysia js