# SocketEventName Decorator experimental
Module | import { SocketEventName } from "@tsed/socketio" |
---|---|
Source | /packages/socketio/src/decorators/socketEventName.ts |
# Overview
function SocketEventName(target: any, propertyKey: string, index: number): any;
# Description
Inject the Socket instance in the decorated parameter.
# Example
@SocketMiddleware("/nsp")
export class MyMiddleware {
use(@SocketEventName eventName: string) {
}
}
1
2
3
4
5
6
2
3
4
5
6
- 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