Skip to content

SocketEventName

@tsed/socketio

Usage ​

typescript
import { SocketEventName } from "@tsed/socketio";

See /packages/third-parties/socketio/src/decorators/socketEventName.ts.

Overview ​

ts
function SocketEventName(target: Object, propertyKey: string, index: number): any;

Description ​

Inject the Socket instance in the decorated parameter.

Example ​

typescript
@SocketMiddleware("/nsp")
export class MyMiddleware {
  use(@SocketEventName eventName: string) {

  }
}

Released under the MIT License.