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

x/hono/types.ts>OnHandlerInterface

Ultrafast web framework for the Edges
Extremely Popular
Go to Latest
interface OnHandlerInterface
import { type OnHandlerInterface } from "https://deno.land/x/hono@v3.1.4/types.ts";

Type Parameters

optional
E extends Env = Env
optional
S = { }
optional
BasePath extends string = ""

Call Signatures

<M extends string, P extends string, O = { }, I extends Input = { }>(
method: M,
path: P,
...handlers: [H<E, MergePath<BasePath, P>, I, O>, H<E, MergePath<BasePath, P>, I, O>],
): Hono<E, RemoveBlankRecord<S | Schema<M, MergePath<BasePath, P>, I["in"], O>>, BasePath>
<M extends string, P extends string, O = { }, I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2>(
method: M,
path: P,
...handlers: [H<E, MergePath<BasePath, P>, I, O>, H<E, MergePath<BasePath, P>, I2, O>, H<E, MergePath<BasePath, P>, I3, O>],
): Hono<E, RemoveBlankRecord<S | Schema<M, MergePath<BasePath, P>, I3["in"], O>>, BasePath>
<M extends string, P extends string, O = { }, I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I2 & I3>(
method: M,
path: P,
...handlers:
[
H<E, MergePath<BasePath, P>, I, O>,
H<E, MergePath<BasePath, P>, I2, O>,
H<E, MergePath<BasePath, P>, I3, O>,
H<E, MergePath<BasePath, P>, I4, O>,
]
,
): Hono<E, RemoveBlankRecord<S | Schema<M, MergePath<BasePath, P>, I4["in"], O>>, BasePath>
<M extends string, P extends string, O = { }, I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I2 & I3, I5 extends Input = I3 & I4>(
method: M,
path: P,
...handlers:
[
H<E, MergePath<BasePath, P>, I, O>,
H<E, MergePath<BasePath, P>, I2, O>,
H<E, MergePath<BasePath, P>, I3, O>,
H<E, MergePath<BasePath, P>, I4, O>,
H<E, MergePath<BasePath, P>, I5, O>,
]
,
): Hono<E, S | Schema<M, MergePath<BasePath, P>, I5["in"], O>, BasePath>
<M extends string, P extends string, O extends { } = { }, I extends Input = { }>(
method: M,
path: P,
...handlers: H<E, MergePath<BasePath, P>, I, O>[],
): Hono<E, RemoveBlankRecord<S | Schema<M, MergePath<BasePath, P>, I["in"], O>>, BasePath>
<P extends string, O extends { } = { }, I extends Input = { }>(
methods: string[],
path: P,
...handlers: H<E, MergePath<BasePath, P>, I, O>[],
): Hono<E, RemoveBlankRecord<S | Schema<string, MergePath<BasePath, P>, I["in"], O>>, BasePath>