Class: Router<E>
routing.Router
Type parameters
Name | Type |
---|---|
E | unknown |
Hierarchy
Router
↳
App
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Router<E
>(init
): Router
<E
>
Type parameters
Name | Type |
---|---|
E | unknown |
Parameters
Name | Type |
---|---|
init | Object |
init.tags? | string [] |
init.deprecated? | boolean |
init.includeInSchema? | boolean |
init.responses? | Record <number , ResponseConfig > |
init.defaultResponseClass? | ResponseClass |
Returns
Router
<E
>
Defined in
Properties
tags
• tags: string
[]
Defined in
deprecated
• deprecated: boolean
Defined in
includeInSchema
• includeInSchema: boolean
Defined in
responses
• responses: Record
<number
, ResponseConfig
>
Defined in
defaultResponseClass
• defaultResponseClass: ResponseClass
Defined in
routeMatcher
• routeMatcher: RouteMatcher
<E
>
Defined in
Methods
get
▸ get<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
post
▸ post<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
put
▸ put<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
delete
▸ delete<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
patch
▸ patch<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
head
▸ head<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
trace
▸ trace<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
options
▸ options<R
, Ps
>(path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>
Defined in
route
▸ route<R
, Ps
>(method
, path
, unboundRoute
): Route
<R
, Ps
, E
>
Type parameters
Name | Type |
---|---|
R | R |
Ps | extends RouteParameters |
Parameters
Name | Type |
---|---|
method | HTTPMethod |
path | string |
unboundRoute | UnboundRoute <R , Ps , E > |
Returns
Route
<R
, Ps
, E
>