import EventEmitter from 'events';
import Command from './command';
/**
 * An object with the following properties always present:
 */
interface JdwpTrackerChangeSet {
    /**
     * An array of pids that were removed. Empty if none.
     */
    removed: string[];
    /**
     * An array of pids that were added. Empty if none.
     */
    added: string[];
}
/**
 * enforce EventEmitter typing
 */
interface IEmissions {
    /**
     * Emitted when the underlying connection ends.
     */
    end: () => void;
    /**
     * **(pid)** Emitted when a JDWP process becomes unavailable, once per pid.
     */
    remove: (pid: string) => void;
    /**
     * **(pid)** Emitted when a new JDWP process becomes available, once per pid.
     */
    add: (pid: string) => void;
    /**
     * All changes in a single event.
     * @param changeSet An object with the following properties always present:
     * @param newList All currently active pids (including pids from previous runs).
     */
    changeSet: (changeSet: JdwpTrackerChangeSet, newList: string[]) => void;
    /**
     * **(err)** Emitted if there's an error.
     */
    error: (err: Error) => void;
}
export default class JdwpTracker extends EventEmitter {
    private command;
    private pids;
    private pidMap;
    constructor(command: Command<JdwpTracker>);
    on: <K extends keyof IEmissions>(event: K, listener: IEmissions[K]) => this;
    off: <K extends keyof IEmissions>(event: K, listener: IEmissions[K]) => this;
    once: <K extends keyof IEmissions>(event: K, listener: IEmissions[K]) => this;
    emit: <K extends keyof IEmissions>(event: K, ...args: Parameters<IEmissions[K]>) => boolean;
    read(): Promise<JdwpTracker>;
    update(newList: string[]): JdwpTracker;
    end(): JdwpTracker;
}
export {};
//# sourceMappingURL=jdwptracker.d.ts.map