/**
 * Concurrency limiter for async operations.
 *
 * @export
 * @class Limiter
 */
export declare class Limiter {
    private concurrency;
    private functionQueue;
    private active;
    private emptyCallbacks;
    constructor(concurrency: number);
    isCancelError(error: Error): boolean;
    /**
     * Create a promise which resolves when all queued functions have been executed.
     *
     */
    empty: () => Promise<void>;
    /**
     * Adds a function to the queue
     *
     */
    queue: <T>(func: () => Promise<T>) => Promise<T>;
    /**
     * Removes and rejects all queued functions.
     *
     * Does not stop any currently executing functions.
     *
     */
    clearQueue: () => void;
    private next;
    private triggerEmptyCallbacks;
    private isDone;
}
