@nestjs/common
Version:
Nest - modern, fast, powerful node.js web framework (@common)
24 lines (23 loc) • 956 B
TypeScript
import { ExceptionFilter } from '../../index';
/**
* Decorator that binds exception filters to the scope of the controller or
* method, depending on its context.
*
* When `@UseFilters` is used at the controller level, the filter will be
* applied to every handler (method) in the controller.
*
* When `@UseFilters` is used at the individual handler level, the filter
* will apply only to that specific method.
*
* @param filters exception filter instance or class, or a list of exception
* filter instances or classes.
*
* @see [Exception filters](https://docs.nestjs.com/exception-filters)
*
* @usageNotes
* Exception filters can also be set up globally for all controllers and routes
* using `app.useGlobalFilters()`. [See here for details](https://docs.nestjs.com/exception-filters#binding-filters)
*
* @publicApi
*/
export declare const UseFilters: (...filters: (ExceptionFilter | Function)[]) => MethodDecorator & ClassDecorator;