Module

x/hono/types.ts>HandlerInterface

Ultrafast web framework for the Edges
Extremely Popular
Go to Latest
interface HandlerInterface
import { type HandlerInterface } from "https://dotland.deno.dev/x/hono@v3.7.0-rc.1/types.ts";

Type Parameters

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

Call Signatures

<P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, I extends Input = { }, R extends HandlerResponse<any> = any, E2 extends Env = E>(handler: H<E2, P, I, R>): Hono<E, S & ToSchema<M, P, I["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, I extends Input = { }, R extends HandlerResponse<any> = any, E2 extends Env = E, E3 extends Env = IntersectNonAnyTypes<[E, E2]>>(...handlers: [H<E2, P, I, R>, H<E3, P, I, R>]): Hono<E, S & ToSchema<M, P, I["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, 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]>>(...handlers: [H<E2, P, I, R>, H<E3, P, I2, R>, H<E4, P, I3, R>]): Hono<E, S & ToSchema<M, P, I3["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, 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,
]
>
>
(...handlers:
[
H<E2, P, I, R>,
H<E3, P, I2, R>,
H<E4, P, I3, R>,
H<E5, P, I3, R>,
]
): Hono<E, S & ToSchema<M, P, I4["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, R extends HandlerResponse<any> = any, I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = 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,
]
>
>
(...handlers:
[
H<E2, P, I, R>,
H<E3, P, I2, R>,
H<E4, P, I3, R>,
H<E5, P, I3, R>,
H<E6, P, I3, R>,
]
): Hono<E, S & ToSchema<M, P, I5["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string = ExtractKey<S> extends never ? BasePath : ExtractKey<S>, I extends Input = { }, R extends HandlerResponse<any> = any>(...handlers: H<E, P, I, R>[]): Hono<E, S & ToSchema<M, P, I["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string, R extends HandlerResponse<any> = any, I extends Input = { }>(path: P): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I["in"], MergeTypedResponseData<R>>, BasePath>
<P extends string, P2 extends string = P, R extends HandlerResponse<any> = any, I extends Input = { }, E2 extends Env = E>(path: P, handler: H<E2, MergePath<BasePath, P2>, I, R>): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I["in"], MergeTypedResponseData<R>>, BasePath>
<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]>>(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>
<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]>>(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>
<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,
]
>
>
(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>
<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 = 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,
]
>
>
(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>
<P extends string, I extends Input = { }, R extends HandlerResponse<any> = any>(path: P, ...handlers: H<E, MergePath<BasePath, P>, I, R>[]): Hono<E, S & ToSchema<M, MergePath<BasePath, P>, I["in"], MergeTypedResponseData<R>>, BasePath>