# 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