tsoa-next / @tsoa-next/runtime / TsoaResponse
Type Alias: TsoaResponse<T, BodyType, HeaderType, ReturnType>
ts
type TsoaResponse<T, BodyType, HeaderType, ReturnType> = (status, data, headers?) => ReturnType;Defined in: packages/runtime/src/interfaces/response.ts:77
Responder function shape injected by Res.
Call the function with a status code, payload, and optional headers to short-circuit the action and send a typed response.
Type Parameters
T
T extends HttpStatusCodeLiteral
BodyType
BodyType
HeaderType
HeaderType extends IsValidHeader<HeaderType> = object
ReturnType
ReturnType = never
Parameters
status
T
data
BodyType
headers?
HeaderType
Returns
ReturnType
