Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ultra/lib/deps.ts>Hono

🧙 Zero-Legacy Deno/React Suspense SSR Framework
Go to Latest
class Hono
Re-export
import { Hono } from "https://deno.land/x/ultra@v2.0.1/lib/deps.ts";

Constructors

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

Type Parameters

optional
E extends Partial<Environment> = Environment
optional
P extends string = "/"
optional
S extends Partial<Schema> = Schema

Properties

private
_tempPath: string
private
errorHandler: ErrorHandler<P, E, S>
private
notFoundHandler: NotFoundHandler<P, E, S>
private
path: string
fetch: (
request: Request,
Environment?: E["Bindings"],
executionCtx?: ExecutionContext,
) => unknown
handleEvent: (event: FetchEvent) => unknown
request: (input: RequestInfo, requestInit?: RequestInit) => unknown
readonly
router: Router<Handler<P, E, S>>
routes: Route<P, E, S>[]
readonly
strict: boolean

Methods

private
addRoute(
method: string,
path: string,
handler: Handler<P, E, S>,
)
private
dispatch(
request: Request,
eventOrExecutionCtx?: ExecutionContext | FetchEvent,
env?: E["Bindings"],
)
private
handleError(err: unknown, c: Context<P, E, S>)
private
matchRoute(method: string, path: string)
notFound(handler: NotFoundHandler<P, E, S>)
onError(handler: ErrorHandler<P, E, S>)
route(path: string, app?: Hono<E, P, S>)
use<Path extends string = string, Data extends Partial<Schema> = Schema>(...middleware: Handler<Path, E, Data>[]): Hono<E, Path, S>
use<Path extends string = string, Data extends Partial<Schema> = Schema>(arg1: string, ...middleware: Handler<Path, E, Data>[]): Hono<E, Path, S>