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

x/hono/types.ts>HandlerInterface

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

Type Parameters

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