Class: MiddlewareStore
Defined in: projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:7
Since
1.0.0
Extends
Store
<Middleware
,"middlewares"
>
Constructors
new MiddlewareStore()
new MiddlewareStore():
MiddlewareStore
Defined in: projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:13
Returns
Overrides
Store<Middleware, 'middlewares'>.constructor
Properties
sortedMiddlewares
readonly
sortedMiddlewares:Middleware
[] =[]
Defined in: projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:11
The sorted middlewares, in ascending order of see Middleware.position.
Methods
clear()
clear():
void
Defined in: projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:43
Returns
void
Overrides
Store.clear
delete()
delete(
key
:string
):boolean
Defined in: projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:34
Parameters
Parameter | Type |
---|---|
key | string |
Returns
boolean
true if an element in the Map existed and has been removed, or false if the element does not exist.
Overrides
Store.delete
run()
run(
request
:ApiRequest
,response
:Response
):Promise
<void
>
Defined in: projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:17
Parameters
Parameter | Type |
---|---|
request | ApiRequest |
response | Response |
Returns
Promise
<void
>
set()
set(
key
:string
,value
:Middleware
):this
Defined in: projects/plugins/packages/api/src/lib/structures/MiddlewareStore.ts:24
Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
Parameters
Parameter | Type |
---|---|
key | string |
value | Middleware |
Returns
this
Overrides
Store.set