RawSocketSession
@tsed/socketio
Usage
typescript
import { RawSocketSession } from "@tsed/socketio";
See /packages/third-parties/socketio/src/types/decorators/socketSession.ts.
Overview
ts
function RawSocketSession(target: any, propertyKey: string, index: number): void;
Description
Inject the raw socket.data
in the decorated parameter.
typescript
@SocketService("/nsp")
export class MyWS {
@Input("event")
myMethod(@RawSocketSession session: Record<string, unknown>) {
console.log(session);
}
}