0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 11:51:01 +01:00
hono/deno_dist/index.ts
2022-07-10 18:54:37 +09:00

21 lines
523 B
TypeScript

// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="./request.ts" /> Import "declare global" for the Request interface.
import { Hono } from './hono.ts'
export type { Handler, Next } from './hono.ts'
export { Context } from './context.ts'
declare module './hono.ts' {
interface Hono {
fire(): void
}
}
Hono.prototype.fire = function () {
addEventListener('fetch', (event: FetchEvent): void => {
void event.respondWith(this.handleEvent(event))
})
}
export { Hono }