UNPKG

956 BTypeScriptView Raw
1import { ExceptionFilter } from '../../index';
2/**
3 * Decorator that binds exception filters to the scope of the controller or
4 * method, depending on its context.
5 *
6 * When `@UseFilters` is used at the controller level, the filter will be
7 * applied to every handler (method) in the controller.
8 *
9 * When `@UseFilters` is used at the individual handler level, the filter
10 * will apply only to that specific method.
11 *
12 * @param filters exception filter instance or class, or a list of exception
13 * filter instances or classes.
14 *
15 * @see [Exception filters](https://docs.nestjs.com/exception-filters)
16 *
17 * @usageNotes
18 * Exception filters can also be set up globally for all controllers and routes
19 * using `app.useGlobalFilters()`. [See here for details](https://docs.nestjs.com/exception-filters#binding-filters)
20 *
21 * @publicApi
22 */
23export declare const UseFilters: (...filters: (ExceptionFilter | Function)[]) => MethodDecorator & ClassDecorator;