/*! * Copyright (c) Microsoft. All rights reserved. * Licensed under the MIT license. See LICENSE file in the project. */ type Handler = (...args: any[]) => any; interface DestroyObject { destroy: (key: string, handler?: Handler) => void; } /** * A mixin that adds support for event emitting */ export declare class EventEmitter { private listeners; /** * Adds an event listener for the given event */ on(key: string, handler?: Handler): DestroyObject | undefined; /** * Removes an event listener for the given event */ off(key: string, handler?: Handler): void; /** * Raises the given event */ emit(name: string, ...args: any[]): void; /** * Returns the namespace and event name * @param eventKey - The event key, either "" or "." */ private getNamespaceAndEvent; } export declare const eventEmitter: () => EventEmitter; export {};