Skip to content
Myr

fix(context): fix type error (#489)

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

authored by Yusuke Wada · committed by GitHub · parent a4f47d1 · Browse files · 4 files+6 added−6 removed
This commit

State

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

Diff stats

4 files+6 added−6 removed

  • other:+6 added−6 removed

4 files+6 added−6 removed

modified:deno_dist/context.ts+2 added-2 removed
modified:deno_dist/hono.ts+1 added-1 removed
82 unmodified lines
83 handler: Handler<string, E>84}8586export class Hono<87 E extends { Bindings?: Bindings; Variables?: Variables } = Environment,87 E extends Partial<Environment> = Environment,88 P extends string = '/'89> extends defineDynamicClass()<E, P, Hono<E, P>> {90 readonly router: Router<Handler<string, E>> = new TrieRouter()91 readonly strict: boolean = true // strict routing - default is true
150 unmodified lines
modified:src/context.ts+2 added-2 removed
7 unmodified lines
8export type Data = string | ArrayBuffer | ReadableStream910export interface Context<11 RequestParamKeyType extends string = string,12 E extends Partial<Environment> = Environment12 E extends Partial<Environment> = any13> {14 req: Request<RequestParamKeyType>15 env: E['Bindings']16 event: FetchEvent
50 unmodified lines
67 notFoundHandler: NotFoundHandler = () => new Response()68 ) {69 this._executionCtx = executionCtx70 this.req = req71 this.env = env ? env : ({} as Bindings)71 this.env = env || ({} as Bindings)7273 this.notFoundHandler = notFoundHandler74 this.finalized = false75 }
116 unmodified lines
modified:src/hono.ts+1 added-1 removed
82 unmodified lines
83 handler: Handler<string, E>84}8586export class Hono<87 E extends { Bindings?: Bindings; Variables?: Variables } = Environment,87 E extends Partial<Environment> = Environment,88 P extends string = '/'89> extends defineDynamicClass()<E, P, Hono<E, P>> {90 readonly router: Router<Handler<string, E>> = new TrieRouter()91 readonly strict: boolean = true // strict routing - default is true
150 unmodified lines