import { EventEmitter } from 'eventemitter3'; declare class Emitter extends EventEmitter { _barriers: Barriers; _lookups: Lookups; /** * Emit an event and an associated payload. * * Update the event collection counters and invoke the associated callbacks * if required. */ emit(event: string, ...args: any[]): boolean; /** * Listen on a collection of events. * * Callbacks registered for a given collection will be invoked each time the * member events have been emitted at least once. Note that the order of the * member events is not significant. * * Callbacks are not invoked with arguments, however, data may be accessed from * the store as normal. * * @param context The context to invoke the listener with. */ all(events: string[], callback: () => void, context?: any): this; /** * Remove a callback for a given collection of events. * * The order of the member events is not significant. */ allOff(events: string[], callback: () => void): this; generateKey(events: string[]): string; } export interface Events { [key: string]: number; } export interface Barrier { callback: () => void; context: any; events: Events; } export interface Barriers { [key: string]: Barrier[]; } export interface Lookups { [key: string]: string[]; } export default Emitter;