/**
 * A mutex lock for coordination across async functions
 */
declare class AwaitLock {
    private _acquired;
    private _waitingResolvers;
    constructor();
    /**
     * Acquires the lock, waiting if necessary for it to become free if it is already locked. The
     * returned promise is fulfilled once the lock is acquired.
     *
     * After acquiring the lock, you **must** call `release` when you are done with it.
     */
    acquireAsync(timeout?: number): Promise<unknown>;
    /**
     * Acquires the lock if it is free and otherwise returns immediately without waiting. Returns
     * `true` if the lock was free and is now acquired, and `false` otherwise,
     */
    tryAcquire(): boolean;
    /**
     * Releases the lock and gives it to the next waiting acquirer, if there is one. Each acquirer
     * must release the lock exactly once.
     */
    release(): void;
    acquired(): boolean;
    debug(): {
        waitingCount: number;
    };
}
export default AwaitLock;
