-
-
Notifications
You must be signed in to change notification settings - Fork 840
Description
What version of Hono are you using?
4.10.3
What runtime/platform is your app running on? (with version if possible)
Cloudflare Workers
What steps can reproduce the bug?
Creating a Cloudflare Workers app with enable_ctx_exports compatibility flag does not gives access to new property exports that should list all top-level exports like DurableObjects. Please check documentation: https://developers.cloudflare.com/changelog/2025-09-26-ctx-exports/
What is the expected behavior?
https://github.com/honojs/hono/blob/main/src/context.ts should not declare it's own ExecutionContext interface but use the one provided by worker-configuration.d.ts generated by wrangler. It could be achieved for example by passing ExecutionContext the same way as Binding and Variables:
const routes = new Hono<{ Bindings: CloudflareBindings; Variables: HonoAuthorizationContext, ExecutionContext: ExecutionContext }>();What do you see instead?
No response
Additional information
This is the functionality available behind compatibility flag, but it looks like it will be GA anytime. Also enabling devs to pass their own type is always future-proof