export declare function createLock(count: number, promise?: PromiseConstructor): Semaphore; export declare class Semaphore { 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; release(): void; }