Skip to content
Myr

feat(hono-base): tweaks `fetch` signature for better compatibility with `deno serve` (#2661)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Taku Amano · committed by GitHub · parent e460f02 · Browse files · 2 files+12 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+12 added−4 removed

  • other:+12 added−4 removed

2 files+12 added−4 removed

modified:deno_dist/hono-base.ts+6 added-2 removed
369 unmodified lines
370 /**371 * `.fetch()` will be entry point of your app.372 * @see https://hono.dev/api/hono#fetch373 */374 fetch = (request: Request, Env?: E['Bindings'] | {}, executionCtx?: ExecutionContext) => {375 return this.dispatch(request, executionCtx, Env, request.method)374 fetch: (375 request: Request,376 Env?: E['Bindings'] | {},377 executionCtx?: ExecutionContext378 ) => Response | Promise<Response> = (request, ...rest) => {379 return this.dispatch(request, rest[1], rest[0], request.method)380 }381382 /**383 * `.request()` is a useful method for testing.
44 unmodified lines
modified:src/hono-base.ts+6 added-2 removed
369 unmodified lines
370 /**371 * `.fetch()` will be entry point of your app.372 * @see https://hono.dev/api/hono#fetch373 */374 fetch = (request: Request, Env?: E['Bindings'] | {}, executionCtx?: ExecutionContext) => {375 return this.dispatch(request, executionCtx, Env, request.method)374 fetch: (375 request: Request,376 Env?: E['Bindings'] | {},377 executionCtx?: ExecutionContext378 ) => Response | Promise<Response> = (request, ...rest) => {379 return this.dispatch(request, rest[1], rest[0], request.method)380 }381382 /**383 * `.request()` is a useful method for testing.
44 unmodified lines