# IO Decorator

Module
import { IO } from "@tsed/socketio"
Source/packages/socketio/src/decorators/io.ts

# Overview

function IO(target: Type<any>, targetKey: string, descriptor: TypedPropertyDescriptor<Function> | number): any;

# Description

Inject the SocketIO.Server instance in the decorated parameter.

# Example

@SocketService("/nsp")
export class MyWS {
  constructor(@IO private io: SocketIO.Server) {}
}
1
2
3
4