menu_book Course Curriculum (NestJS) expand_more
Core Architecture
Request Pipeline
Data and Messaging
Interceptor
Learn Interceptor in NestJS through a focused explanation, a topic-specific example, an engineering warning, and a mastery check.
12 min read
•
Intermediate
Advertisement
nestjs-015.ts
typescript
@Injectable()
class TimingInterceptor implements NestInterceptor { intercept(ctx:ExecutionContext,next:CallHandler){ const start=Date.now(); return next.handle().pipe(finalize(()=>console.log(Date.now()-start))); } }
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content