@webroute/middlewareType aliases
MiddlewareResult
MiddlewareResult<
T
,TRest
>:Response
|T
|ResponseHandler
<TRest
> |undefined
Could be empty, a state update value (primitive, object or array value), or a response handler.
- If a state update is returned, the consumer is responsible for mutating the request state to append this information.
- If a response handler is returnned, the consumer is responsible for calling this at the appropriate time during the request.
Type Parameters
Type Parameter | Default type |
---|---|
T extends DataResult | void | void |
TRest extends any [] | any [] |