Module

x/hono/types.ts>OnHandlerInterface

Lightweight, Ultrafast, Web Standards
Extremely Popular
Go to Latest
interface OnHandlerInterface
import { type OnHandlerInterface } from "https://dotland.deno.dev/x/hono@v3.9.2/types.ts";

Type Parameters

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

Call Signatures

<M extends string, P extends string, P2 extends string = P, P3 extends string = P, R extends HandlerResponse<any> = any, I extends Input = { }, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(
method: M,
path: P,
...handlers: [H<E2, MergePath<BasePath, P2>, I, R>, H<E3, MergePath<BasePath, P3>, I, R>],
): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I["in"], MergeTypedResponseData<R>>, BasePath>
<M extends string, P extends string, P2 extends string = P, P3 extends string = P, P4 extends string = P, R extends HandlerResponse<any> = any, I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E, E3 extends Env = E, E4 extends Env = IntersectNonAnyTypes<[E, E2, E3]>>(
method: M,
path: P,
...handlers: [H<E2, MergePath<BasePath, P2>, I, R>, H<E3, MergePath<BasePath, P3>, I2, R>, H<E4, MergePath<BasePath, P4>, I3, R>],
): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I3["in"], MergeTypedResponseData<R>>, BasePath>
<M extends string, P extends string, P2 extends string = P, P3 extends string = P, P4 extends string = P, P5 extends string = P, R extends HandlerResponse<any> = any, I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E, E3 extends Env = E, E4 extends Env = E, E5 extends Env = IntersectNonAnyTypes<
[
E,
E2,
E3,
E4,
]
>
>
(
method: M,
path: P,
...handlers:
[
H<E2, MergePath<BasePath, P2>, I, R>,
H<E3, MergePath<BasePath, P3>, I2, R>,
H<E4, MergePath<BasePath, P4>, I3, R>,
H<E5, MergePath<BasePath, P5>, I4, R>,
]
,
): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I4["in"], MergeTypedResponseData<R>>, BasePath>
<M extends string, P extends string, P2 extends string = P, P3 extends string = P, P4 extends string = P, P5 extends string = P, P6 extends string = P, R extends HandlerResponse<any> = any, I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input =
& I
& I2
& I3
& I4
, E2 extends Env = E, E3 extends Env = E, E4 extends Env = E, E5 extends Env = E, E6 extends Env = IntersectNonAnyTypes<
[
E,
E2,
E3,
E4,
E5,
]
>
>
(
method: M,
path: P,
...handlers:
[
H<E2, MergePath<BasePath, P2>, I, R>,
H<E3, MergePath<BasePath, P3>, I2, R>,
H<E4, MergePath<BasePath, P4>, I3, R>,
H<E5, MergePath<BasePath, P5>, I4, R>,
H<E6, MergePath<BasePath, P6>, I5, R>,
]
,
): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I5["in"], MergeTypedResponseData<R>>, BasePath>
<M extends string, P extends string, R extends HandlerResponse<any> = any, I extends Input = { }>(
method: M,
path: P,
...handlers: H<E, MergePath<BasePath, P>, I, R>[],
): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string, R extends HandlerResponse<any> = any, I extends Input = { }>(
methods: string[],
path: P,
...handlers: H<E, MergePath<BasePath, P>, I, R>[],
): Hono<E, S & ToSchema<string, MergePath<BasePath, P>, I["in"], MergeTypedResponseData<R>>, BasePath>