Class: MiddlewareList
Constructors
new MiddlewareList()
new MiddlewareList(): MiddlewareList
Returns
Methods
add()
add<T>(
name,
handler,
unique): Middleware[]
Type Parameters
Type Parameter |
---|
T extends MiddlewareType |
Parameters
Parameter | Type | Default value |
---|---|---|
name | T | undefined |
handler | MiddlewareHandlers [T ] | undefined |
unique | boolean | false |
Returns
clear()
clear(): Middleware[]
Returns
get()
get(name)
get(name): RequestMiddleware[]
Parameters
Parameter | Type |
---|---|
name | REQUEST |
Returns
get(name)
get(name): ResponseMiddleware[]
Parameters
Parameter | Type |
---|---|
name | RESPONSE |
Returns
get(name)
get(name): RenderMiddleware[]
Parameters
Parameter | Type |
---|---|
name | RENDER |
Returns
get(name)
get(name): MapLoadMiddleware[]
Parameters
Parameter | Type |
---|---|
name | MAP_LOAD |
Returns
off()
off(eventName, handler?): MiddlewareList
Parameters
Parameter | Type |
---|---|
eventName | string |
handler ? | MiddlewareHandler |
Returns
removeByType()
removeByType(type): Middleware[]
Parameters
Parameter | Type |
---|---|
type | MiddlewareType |
Returns
run()
run(type, params)
run(type, params): Record<string, unknown>
Parameters
Parameter | Type |
---|---|
type | REQUEST |
params | [unknown , object ] |
Returns
Record
<string
, unknown
>
run(type, params)
run(type, params): string | Record<string, unknown>
Parameters
Parameter | Type |
---|---|
type | RESPONSE |
params | [unknown , object ] |
Returns
string
| Record
<string
, unknown
>
run(type, params)
run(type, params): Record<string, unknown>
Parameters
Parameter | Type |
---|---|
type | RENDER |
params | [Record <string , unknown >, object ] |
Returns
Record
<string
, unknown
>
run(type, params)
run(type, params): MapOptions
Parameters
Parameter | Type |
---|---|
type | MAP_LOAD |
params | [MapOptions , object ] |
Returns
Properties
middlewares
middlewares: Middleware[];