hono icon indicating copy to clipboard operation
hono copied to clipboard

Update the C3 behavior for Cloudflare Workers template

Open yusukebe opened this issue 6 months ago • 2 comments

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.

yusukebe avatar Jul 27 '24 08:07 yusukebe