Skip to main content
Module

x/hono/hono.ts>Hono

Ultrafast web framework for the Edge
Extremely Popular
Go to Latest
class Hono
import { Hono } from "https://deno.land/x/hono@v3.0.1/hono.ts";

Constructors

new
Hono(init?: Partial<Pick<Hono, "router" | "strict">>)

Type Parameters

optional
E extends Env = Env
optional
S = { }

Properties

private
_tempPath: string
private
errorHandler: ErrorHandler
private
notFoundHandler: NotFoundHandler
private
path: string
fetch: (
request: Request,
Env?: E["Bindings"] | { },
executionCtx?: ExecutionContext,
) => unknown
handleEvent: (event: FetchEvent) => unknown
request: (input: Request | string, requestInit?: RequestInit) => unknown
readonly
router: Router<H>
routes: RouterRoute[]
readonly
strict: boolean

Methods

private
addRoute(
method: string,
path: string,
handler: H,
)
private
dispatch(
request: Request,
eventOrExecutionCtx?: ExecutionContext | FetchEvent,
env?: E["Bindings"],
): Response | Promise<Response>
private
handleError(err: unknown, c: Context<E>)
private
matchRoute(method: string, path: string)
route<SubPath extends string, SubSchema>(path: SubPath, app?: Hono<E, SubSchema>): Hono<E, RemoveBlankRecord<MergeSchemaPath<SubSchema, SubPath> | S>>