Webroute

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 ParameterDefault type
T extends DataResult | voidvoid
TRest extends any[]any[]

On this page