# Interceptor Decorator
| Module | import { Interceptor } from "@tsed/di" |
|---|---|
| Source | /packages/di/src/decorators/interceptor.ts |
# Overview
function Interceptor(): Function;# Description
The decorators @Service() a new service can be injected in other service or controller on there constructor.
All services annotated with @Service() are constructed one time.
@Service()use thereflect-metadatato collect and inject service on controllers or other services.
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing