Skip to content

tsoa-next / @tsoa-next/runtime / Res

Function: Res()

ts
function Res(): ParameterDecorator;

Defined in: packages/runtime/src/decorators/response.ts:38

Inject a library-agnostic responder function that can be used to construct type-checked (usually error-) responses.

Annotate the parameter as TsoaResponse<Status, Data, Headers> so tsoa can infer the documented response.

Returns

ParameterDecorator

TypeScript-first OpenAPI generation, route generation, and runtime validation.