Skip to content

tsoa-next / tsoa-next / Middlewares

Function: Middlewares()

ts
function Middlewares<T>(...mws): ClassDecorator & MethodDecorator;

Defined in: packages/runtime/src/decorators/middlewares.ts:41

Attaches one or more runtime middleware handlers to a controller or action.

Type Parameters

T

T extends object | CallableFunction

Parameters

mws

...T[]

The middleware functions or middleware objects to install.

Returns

ClassDecorator & MethodDecorator

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