Module

x/hono/helper.ts>Factory

Web Framework built on Web Standards
Extremely Popular
Go to Latest
class Factory
import { Factory } from "https://dotland.deno.dev/x/hono@v4.3.2/helper.ts";

Constructors

new
Factory(init?: { initApp?: InitApp<E>; })

Type Parameters

optional
E extends Env = any
optional
P extends string = any

Properties

private
optional
initApp: InitApp<E>
createApp: () => unknown
createMiddleware: <I extends Input = { }>(middleware: MiddlewareHandler<E, P, I>) => unknown

Methods

createHandlers<I extends Input = { }, R extends HandlerResponse<any> = any>(handler1: H<E, P, I, R>): [H<E, P, I, R>]
createHandlers<I extends Input = { }, I2 extends Input = I, R extends HandlerResponse<any> = any>(handler1: H<E, P, I, R>, handler2: H<E, P, I2, R>): [H<E, P, I, R>, H<E, P, I2, R>]
createHandlers<I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, R extends HandlerResponse<any> = any>(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
): [H<E, P, I, R>, H<E, P, I2, R>, H<E, P, I3, R>]
createHandlers<I extends Input = { }, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, R extends HandlerResponse<any> = any>(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
handler4: H<E, P, I4, R>,
):
[
H<E, P, I, R>,
H<E, P, I2, R>,
H<E, P, I3, R>,
H<E, P, I4, R>,
]
createHandlers<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
, R extends HandlerResponse<any> = any>
(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
handler4: H<E, P, I4, R>,
handler5: H<E, P, I5, R>,
):
[
H<E, P, I, R>,
H<E, P, I2, R>,
H<E, P, I3, R>,
H<E, P, I4, R>,
H<E, P, I5, R>,
]
createHandlers<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
, I6 extends Input =
& I
& I2
& I3
& I4
& I5
, R extends HandlerResponse<any> = any>
(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
handler4: H<E, P, I4, R>,
handler5: H<E, P, I5, R>,
handler6: H<E, P, I6, R>,
):
[
H<E, P, I, R>,
H<E, P, I2, R>,
H<E, P, I3, R>,
H<E, P, I4, R>,
H<E, P, I5, R>,
H<E, P, I6, R>,
]
createHandlers<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
, I6 extends Input =
& I
& I2
& I3
& I4
& I5
, I7 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
, R extends HandlerResponse<any> = any>
(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
handler4: H<E, P, I4, R>,
handler5: H<E, P, I5, R>,
handler6: H<E, P, I6, R>,
handler7: H<E, P, I7, R>,
):
[
H<E, P, I, R>,
H<E, P, I2, R>,
H<E, P, I3, R>,
H<E, P, I4, R>,
H<E, P, I5, R>,
H<E, P, I6, R>,
H<E, P, I7, R>,
]
createHandlers<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
, I6 extends Input =
& I
& I2
& I3
& I4
& I5
, I7 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
, I8 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
& I7
, R extends HandlerResponse<any> = any>
(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
handler4: H<E, P, I4, R>,
handler5: H<E, P, I5, R>,
handler6: H<E, P, I6, R>,
handler7: H<E, P, I7, R>,
handler8: H<E, P, I8, R>,
):
[
H<E, P, I, R>,
H<E, P, I2, R>,
H<E, P, I3, R>,
H<E, P, I4, R>,
H<E, P, I5, R>,
H<E, P, I6, R>,
H<E, P, I7, R>,
H<E, P, I8, R>,
]
createHandlers<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
, I6 extends Input =
& I
& I2
& I3
& I4
& I5
, I7 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
, I8 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
& I7
, I9 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
& I7
& I8
, R extends HandlerResponse<any> = any>
(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
handler4: H<E, P, I4, R>,
handler5: H<E, P, I5, R>,
handler6: H<E, P, I6, R>,
handler7: H<E, P, I7, R>,
handler8: H<E, P, I8, R>,
handler9: H<E, P, I9, R>,
):
[
H<E, P, I, R>,
H<E, P, I2, R>,
H<E, P, I3, R>,
H<E, P, I4, R>,
H<E, P, I5, R>,
H<E, P, I6, R>,
H<E, P, I7, R>,
H<E, P, I8, R>,
H<E, P, I9, R>,
]
createHandlers<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
, I6 extends Input =
& I
& I2
& I3
& I4
& I5
, I7 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
, I8 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
& I7
, I9 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
& I7
& I8
, I10 extends Input =
& I
& I2
& I3
& I4
& I5
& I6
& I7
& I8
& I9
, R extends HandlerResponse<any> = any>
(
handler1: H<E, P, I, R>,
handler2: H<E, P, I2, R>,
handler3: H<E, P, I3, R>,
handler4: H<E, P, I4, R>,
handler5: H<E, P, I5, R>,
handler6: H<E, P, I6, R>,
handler7: H<E, P, I7, R>,
handler8: H<E, P, I8, R>,
handler9: H<E, P, I9, R>,
handler10: H<E, P, I10, R>,
):
[
H<E, P, I, R>,
H<E, P, I2, R>,
H<E, P, I3, R>,
H<E, P, I4, R>,
H<E, P, I5, R>,
H<E, P, I6, R>,
H<E, P, I7, R>,
H<E, P, I8, R>,
H<E, P, I9, R>,
H<E, P, I10, R>,
]