Skip to content

Interceptor

@tsed/di

Usage

typescript
import { Interceptor } from "@tsed/di";

See /packages/di/src/types/common/decorators/interceptor.ts.

Overview

ts
function Interceptor(): Function;

Description

The decorators @Interceptor() a new service can be injected in other service or controller on there constructor. All services annotated with @Interceptor() are constructed one time.

@Service() use the reflect-metadata to collect and inject service on controllers or other services.

Released under the MIT License.