# 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>;
}