hono
hono copied to clipboard
Update the C3 behavior for Cloudflare Workers template
Currently, if we create a new Cloudflare Workers project with C3, C3 will add the following code to index.ts
:
type Bindings = {
[key in keyof CloudflareBindings]: CloudflareBindings[key]
}
This snippet does convert interface
to type
because new Hono()
does not accept interface
before.
But, since v4.5.0, we can pass an interface
to it! We can remove that snippet and pass the CloudflareBindings
directly.