Input
@tsed/socketio
Usage
typescript
import { Input } from "@tsed/socketio";
See /packages/third-parties/socketio/src/types/decorators/input.ts.
Overview
ts
function Input(eventName: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
Description
Attach the decorated method to the socket event.
Example
typescript
@SocketService("/nsp")
export class MyWS {
@Input("event")
myMethod(@Args(0) data: any, @Nsp socket) {
}
}