/**
 * Remove listeners that match listener
 * @param targetListeners is an array of listener arrays or event objects with arrays of listeners
 * @param listener the listener callback to remove
 * @param eventFilter (optional) event name instructing the function to only remove listeners for the specified event
 */
export declare function removeListener(targetListeners: (Function[] | Record<string, Function[]>)[], listener: Function, eventFilter?: string): void;
export declare function inspect(args: unknown): string;
export declare class InvalidArgumentError extends Error {
    constructor(...args: [string | undefined]);
}
export type EventMap = Record<string, unknown>;
export type EventKey<T extends EventMap> = string & keyof T;
export type EventListener<T> = (params: T) => void;
export default class EventEmitter<T extends EventMap> {
    any: Array<Function>;
    events: Record<string, Function[]>;
    anyOnce: Array<Function>;
    eventsOnce: Record<string, Function[]>;
    constructor();
    /**
     * Add an event listener
     * @param listenerOrEvents (optional) the name of the event to listen to or the listener to be called.
     * @param listener (optional) the listener to be called.
     */
    on<K extends EventKey<T>>(listenerOrEvents?: K | K[] | EventListener<T[K]>, listener?: EventListener<T[K]>): void;
    /**
     * Remove one or more event listeners
     * @param listenerOrEvents (optional) the name of the event whose listener is to be removed. If not supplied,
     * the listener is treated as an 'any' listener.
     * @param listener (optional) the listener to remove. If not supplied, all listeners are removed.
     */
    off<K extends EventKey<T>>(listenerOrEvents?: K | K[] | EventListener<T[K]>, listener?: EventListener<T[K]>): void;
    /**
     * Get the array of listeners for a given event; excludes once events
     * @param event (optional) the name of the event, or none for 'any'
     * @return array of events, or null if none
     */
    listeners<K extends EventKey<T>>(event: K): Function[] | null;
    /**
     * Emit an event
     * @param event the event name
     * @param arg the arguments to pass to the listener
     */
    emit<K extends EventKey<T>>(event: K, arg: T[K]): void;
    /**
     * Listen for a single occurrence of an event
     * @param listenerOrEvents (optional) the name of the event to listen to
     * @param listener (optional) the listener to be called
     */
    once<K extends EventKey<T>>(listenerOrEvents: K | K[] | EventListener<T[K]>, listener?: EventListener<T[K]>): void | Promise<any>;
    /**
     * Private API
     *
     * Listen for a single occurrence of a state event and fire immediately if currentState matches targetState
     * @param targetState the name of the state event to listen to
     * @param currentState the name of the current state of this object
     * @param listener the listener to be called
     * @param listenerArgs
     */
    whenState(targetState: string, currentState: string, listener: EventListener<T[string]>, ...listenerArgs: unknown[]): Promise<unknown> | undefined;
}
