0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 10:51:01 +00:00
hono/deno_dist/mod.ts

52 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-07-02 06:09:45 +00:00
import { Hono } from './hono.ts'
declare global {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
class ExtendableEvent extends Event {
constructor(type: string, init?: EventInit)
waitUntil(promise: Promise<void>): void
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
abstract class FetchEvent extends ExtendableEvent {
2022-07-02 06:09:45 +00:00
readonly request: Request
respondWith(promise: Response | Promise<Response>): void
passThroughOnException(): void
2022-07-02 06:09:45 +00:00
}
interface ExecutionContext {
waitUntil(promise: Promise<void>): void
2022-07-02 06:09:45 +00:00
passThroughOnException(): void
}
}
export type {
Env,
ErrorHandler,
Handler,
MiddlewareHandler,
Next,
NotFoundHandler,
ValidationTargets,
2023-03-31 09:17:45 +00:00
Input,
TypedResponse,
} from './types.ts'
export type { Context, ContextVariableMap } from './context.ts'
export type { HonoRequest } from './request.ts'
2022-07-02 06:09:45 +00:00
export { Hono }
export { HTTPException } from './http-exception.ts'
2022-07-02 06:09:45 +00:00
// Router
export { RegExpRouter } from './router/reg-exp-router/index.ts'
export { TrieRouter } from './router/trie-router/index.ts'
export { SmartRouter } from './router/smart-router/index.ts'
export { PatternRouter } from './router/pattern-router/index.ts'
export { LinearRouter } from './router/linear-router/index.ts'
// Validator
export { validator } from './validator/index.ts'
// Client
export { hc } from './client/index.ts'
export type { InferRequestType, InferResponseType, ClientRequestOptions } from './client/index.ts'