type EventMap<T> = Map<keyof T, EventSet>;
type EventSet = Set<Function>;
export declare class EventEmitter<T extends Record<string, any> = {}> {
    readonly _events: EventMap<T>;
    constructor();
    _get_methods(event: keyof T): EventSet;
    has(topic: string): boolean;
    on<K extends keyof T>(event: K, method: (args: T[K]) => void | Promise<void>): void;
    once<K extends keyof T>(event: K, method: (args: T[K]) => void | Promise<void>): void;
    within<K extends keyof T>(event: K, method: (args: T[K]) => void | Promise<void>, timeout: number): void;
    emit<K extends keyof T>(event: string, args: T[K]): void;
    remove<K extends keyof T>(event: K, method: (args: T[K]) => void): void;
    clear(event: string): void;
}
export {};
