export declare function createLock(count: number, promise?: PromiseConstructor): Semaphore<number>;
export declare class Semaphore<T = number> {
    size: number;
    private promise;
    private waiting;
    private locks;
    private requestedLockCount;
    private createDeferred;
    constructor(size?: number, promise?: PromiseConstructor);
    readonly count: number;
    readonly pending: number;
    acquire(arg?: T): Promise<T>;
    release(): void;
}
