# SocketSession Type alias

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

# Overview

type SocketSession = Map<string, any>;
/**
 * Inject the Socket instance in the decorated parameter.
 *
 * ### Example
 *
 * ```typescript
 * @SocketService("/nsp")
 * export class MyWS {
 *
 *   @Input("event")
 *   myMethod(@SocketSession session: Map) {
 *     console.log(session);
 *   }
 * }
 * ```
 *
 * @param target
 * @param {string} propertyKey
 * @param {number} index
 * @decorator
 */
export function SocketSession(target: any, propertyKey: string, index: number): any;

Other topics