/**
 * Interface that represents each indivial promise waiting in the queue.
 */
interface WaitingPromise {
    resolve: (value?: void | PromiseLike<void>) => void;
}
/**
 * Similar to the Semaphore but stops the execution on the Promise level instead of the whole thread.
 * @internal
 */
export declare class ConcurrentSemaphore {
    /**
     * Number of concurrent promises allowed to run at the same time.
     */
    permits?: number;
    /**
     * Queue of promises waiting for a permit to be available.
     */
    queue: WaitingPromise[];
    constructor();
    /**
     * Acquires a permit to keep the execution.
     * @return a Promise that is completed once there is a permit available.
     */
    acquire(): Promise<void>;
    /**
     * Releases a permit and allows other Promises to run.
     */
    release(): void;
}
export {};
