UNPKG

@nestjs/common

Version:

Nest - modern, fast, powerful node.js web framework (@common)

24 lines (23 loc) 979 B
import { NestInterceptor } from '../../interfaces'; /** * Decorator that binds interceptors to the scope of the controller or method, * depending on its context. * * When `@UseInterceptors` is used at the controller level, the interceptor will * be applied to every handler (method) in the controller. * * When `@UseInterceptors` is used at the individual handler level, the interceptor * will apply only to that specific method. * * @param interceptors a single interceptor instance or class, or a list of * interceptor instances or classes. * * @see [Interceptors](https://docs.nestjs.com/interceptors) * * @usageNotes * Interceptors can also be set up globally for all controllers and routes * using `app.useGlobalInterceptors()`. [See here for details](https://docs.nestjs.com/interceptors#binding-interceptors) * * @publicApi */ export declare function UseInterceptors(...interceptors: (NestInterceptor | Function)[]): MethodDecorator & ClassDecorator;