Skip to content
Myr

refactor(app): add "deprecate message" for `app.handleEvent()` (#1298)

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

* refactor(app): add "deprecate message" for `app.handleEvent()` * denoify

authored by Yusuke Wada · committed by GitHub · parent 4a3c583 · Browse files · 3 files+16 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

3 files+16 added−6 removed

  • other:+16 added−6 removed

3 files+16 added−6 removed

modified:benchmarks/handle-event/index.js+2 added-2 removed
modified:deno_dist/hono-base.ts+7 added-2 removed
349 unmodified lines
350 }351 })()352 }353354 /**355 * @deprecate356 * `app.handleEvent()` will be removed in v4.357 * Use `app.fetch()` instead of `app.handleEvent()`.358 */359 handleEvent = (event: FetchEventLike) => {360 return this.dispatch(event.request, event, undefined, event.request.method)361 }362
16 unmodified lines
379380 fire = () => {381 // eslint-disable-next-line @typescript-eslint/ban-ts-comment382 // @ts-ignore378 addEventListener('fetch', (event: FetchEvent): void => {379 void event.respondWith(this.handleEvent(event))383 addEventListener('fetch', (event: FetchEventLike): void => {384 event.respondWith(this.dispatch(event.request, event, undefined, event.request.method))385 })386 }387}388
1 unmodified line
modified:src/hono-base.ts+7 added-2 removed
349 unmodified lines
350 }351 })()352 }353354 /**355 * @deprecate356 * `app.handleEvent()` will be removed in v4.357 * Use `app.fetch()` instead of `app.handleEvent()`.358 */359 handleEvent = (event: FetchEventLike) => {360 return this.dispatch(event.request, event, undefined, event.request.method)361 }362
16 unmodified lines
379380 fire = () => {381 // eslint-disable-next-line @typescript-eslint/ban-ts-comment382 // @ts-ignore378 addEventListener('fetch', (event: FetchEvent): void => {379 void event.respondWith(this.handleEvent(event))383 addEventListener('fetch', (event: FetchEventLike): void => {384 event.respondWith(this.dispatch(event.request, event, undefined, event.request.method))385 })386 }387}388
1 unmodified line