# LocalsContainer Class
Module | import { LocalsContainer } from "@tsed/di" |
---|---|
Source | /packages/di/src/class/LocalsContainer.ts |
# Overview
class LocalsContainer<V> extends Map<TokenProvider, V> {
/**
* Emit an event to all service. See service [lifecycle hooks](/docs/services.md#lifecycle-hooks).
* @param eventName The event name to emit at all services.
* @param args List of the parameters to give to each services.
* @returns {Promise<any[]>} A list of promises.
*/
emit(eventName: string, ...args: any[]): Promise<void>;
toArray(): V[];
destroy(): Promise<void>;
}
# Members
emit(eventName: string, ...args: any[]): Promise<void>;
Param | Type | Description |
---|---|---|
eventName | string | The event name to emit at all services. args |
Emit an event to all service. See service
toArray(): V[];
destroy(): Promise<void>;
- 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