@webroute/routeInterfaces
HandlerFunction
Extends
DecoratedRequestHandler<TParams["InferredParams"] extendsnever?TParams["ParamsOut"] :MergeObjectsShallow<TParams["InferredParams"],TParams["ParamsOut"]>,TParams["QueryOut"],TParams["BodyOut"],TParams["HeadersReqOut"],TParams["OutputIn"],TParams["State"],TParams["Providers"]>
Type Parameters
| Type Parameter |
|---|
TParams extends RouteParams |
HandlerFunction(
request,ctx):Awaitable<Response|TParams["OutputIn"]>
Parameters
| Parameter | Type |
|---|---|
request | Request |
ctx | object |
ctx.parse | ParseInputsFn<unknown extends TParams["InferredParams"] extends never ? TParams["ParamsOut"] : { [KeyType in string | number | symbol]: ({ [K in string | number | symbol]: K extends keyof (...)[(...)] ? (...)[(...)][K<(...)>] : (...)[(...)][K] } & TParams["ParamsOut"])[KeyType] } ? Record<string, undefined | string> : TParams["InferredParams"] extends never ? TParams["ParamsOut"] : { [KeyType in string | number | symbol]: ({ [K in string | number | symbol]: K extends keyof (...)[(...)] ? (...)[(...)][K<(...)>] : (...)[(...)][K] } & TParams["ParamsOut"])[KeyType] }, unknown extends TParams["QueryOut"] ? Record<string, undefined | string> : TParams["QueryOut"], unknown extends TParams["BodyOut"] ? TParams["BodyOut"] : TParams["BodyOut"], unknown extends TParams["HeadersReqOut"] ? Record<string, undefined | string> : TParams["HeadersReqOut"]> |
ctx.services | ServiceMap<TParams["Providers"]> |
ctx.state | { [KeyType in string | number | symbol]: TParams["State"][KeyType] } |
