# 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;
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing