/api
/interceptors

Interceptors API Reference

Interceptor Interface

interface InterceptorInterface {
  intercept(
    context: ExecutionContext,
    next: () => Promise<any>
  ): Promise<any>;
}

Example

@Interceptor()
export class MyInterceptor implements InterceptorInterface {
  async intercept(context: ExecutionContext, next: () => Promise<any>): Promise<any> {
    const result = await next();
    return { success: true, data: result };
  }
}

Next Steps