import type { ILocker, ILockerLease } from '../interfaces/ILocker.ts'; export declare class LockLease implements ILockerLease { readonly lock: Lock; readonly name?: string; constructor(lock: Lock, name?: string); release(): void; [Symbol.dispose](): void; } export declare class Lock implements ILocker { #private; isLocked(name?: string): boolean; /** * Acquire named or global lock * * @returns Promise that resolves once lock is acquired */ acquire(name?: string): Promise; /** * @returns Promise that resolves once lock is released */ waitForUnlock(name?: string): Promise; /** * Release named or global lock */ release(name?: string): void; /** * Execute callback with lock acquired, then release lock */ runExclusively(name: string | undefined, callback: () => Promise | T): Promise; }