import { StringKeys } from "./types";
export declare type Listener = {
    once?: boolean;
    cb: Function;
};
export declare class EventEmitter<EP extends Record<string, any> = Record<string, any>> {
    protected listeners: Record<string, {
        once?: boolean;
        cb: Function;
    }[]>;
    constructor();
    protected addListener<K extends StringKeys<EP>>(event: K, listener: Listener): void;
    on<K extends StringKeys<EP>>(event: K, listener: (data: EP[K]) => void): void;
    once<K extends StringKeys<EP>>(event: K, listener?: (data: EP[K]) => void): Promise<EP[K]>;
    emit<K extends StringKeys<EP>>(event: K, data: EP[K]): void;
    off<K extends StringKeys<EP>>(event: K, listener: Function): void;
    getListeners<K extends StringKeys<EP>>(event: K): Function[];
}
