@webroute/routeInterfaces
DecoratedRequestHandler
Extended by
Type Parameters
Type Parameter | Default type |
---|---|
TParams | unknown |
TQuery | unknown |
TBody | unknown |
THeaders | unknown |
TOutput | unknown |
TState | unknown |
TProviders | unknown |
DecoratedRequestHandler(
request
,ctx
):Awaitable
<Response
|TOutput
>
Parameters
Parameter | Type |
---|---|
request | Request |
ctx | object |
ctx.parse | ParseInputsFn <unknown extends TParams ? Record <string , undefined | string > : TParams , unknown extends TQuery ? Record <string , undefined | string > : TQuery , unknown extends TBody ? TBody : TBody , unknown extends THeaders ? Record <string , undefined | string > : THeaders > |
ctx.services | ServiceMap <TProviders > |
ctx.state | { [KeyType in string | number | symbol]: TState[KeyType] } |