Skip to content
Myr

refactor(hono-base): add type annotations (#4591)

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 d454b31 · Browse files · 1 file+2 added−2 removed
This commit

State

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

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/hono-base.ts+2 added-2 removed
380 unmodified lines
381 this.#addRoute(METHOD_NAME_ALL, mergePath(path, '*'), handler)382 return this383 }384385 #addRoute(method: string, path: string, handler: H) {385 #addRoute(method: string, path: string, handler: H): void {386 method = method.toUpperCase()387 path = mergePath(this._basePath, path)388 const r: RouterRoute = { basePath: this._basePath, path, method, handler }389 this.router.add(method, path, [handler, r])390 this.routes.push(r)391 }392393 #handleError(err: unknown, c: Context<E>) {393 #handleError(err: unknown, c: Context<E>): Response | Promise<Response> {394 if (err instanceof Error) {395 return this.errorHandler(err, c)396 }397 throw err
142 unmodified lines