2022-07-02 08:09:45 +02:00
|
|
|
import { Hono } from './hono.ts'
|
|
|
|
|
|
|
|
declare global {
|
2023-01-31 22:36:48 +01:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
// @ts-ignore
|
2022-07-17 11:36:42 +02:00
|
|
|
class ExtendableEvent extends Event {
|
|
|
|
constructor(type: string, init?: EventInit)
|
2022-12-02 03:28:49 +01:00
|
|
|
waitUntil(promise: Promise<void>): void
|
2022-07-17 11:36:42 +02:00
|
|
|
}
|
2023-01-31 22:36:48 +01:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
// @ts-ignore
|
2022-07-17 11:36:42 +02:00
|
|
|
abstract class FetchEvent extends ExtendableEvent {
|
2022-07-02 08:09:45 +02:00
|
|
|
readonly request: Request
|
2022-07-17 11:36:42 +02:00
|
|
|
respondWith(promise: Response | Promise<Response>): void
|
|
|
|
passThroughOnException(): void
|
2022-07-02 08:09:45 +02:00
|
|
|
}
|
|
|
|
interface ExecutionContext {
|
2022-12-02 03:28:49 +01:00
|
|
|
waitUntil(promise: Promise<void>): void
|
2022-07-02 08:09:45 +02:00
|
|
|
passThroughOnException(): void
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-02 07:48:17 +01:00
|
|
|
export type {
|
2023-01-31 22:36:48 +01:00
|
|
|
Env,
|
2023-01-02 07:48:17 +01:00
|
|
|
ErrorHandler,
|
2023-02-02 21:56:59 +01:00
|
|
|
Handler,
|
2023-01-31 22:36:48 +01:00
|
|
|
MiddlewareHandler,
|
|
|
|
Next,
|
2023-01-02 07:48:17 +01:00
|
|
|
NotFoundHandler,
|
2023-02-13 22:21:30 +01:00
|
|
|
ValidationTargets,
|
2023-03-31 11:17:45 +02:00
|
|
|
Input,
|
2023-01-02 07:48:17 +01:00
|
|
|
} from './types.ts'
|
2022-12-28 03:25:48 +01:00
|
|
|
export type { Context, ContextVariableMap } from './context.ts'
|
2023-02-24 18:48:18 +01:00
|
|
|
export type { HonoRequest } from './request.ts'
|
2022-07-02 08:09:45 +02:00
|
|
|
export { Hono }
|
|
|
|
|
|
|
|
// Router
|
|
|
|
export { RegExpRouter } from './router/reg-exp-router/index.ts'
|
|
|
|
export { TrieRouter } from './router/trie-router/index.ts'
|
2022-10-24 16:22:05 +02:00
|
|
|
export { SmartRouter } from './router/smart-router/index.ts'
|
2023-04-26 03:15:45 +02:00
|
|
|
export { PatternRouter } from './router/pattern-router/index.ts'
|
2023-02-10 17:18:27 +01:00
|
|
|
|
|
|
|
// Validator
|
|
|
|
export { validator } from './validator/index.ts'
|
|
|
|
|
|
|
|
// Client
|
|
|
|
export { hc } from './client/index.ts'
|
|
|
|
export type { InferResponseType } from './client/index.ts'
|