export interface LockOptions {
    /** How long to wait to acquire the lock before failing. */
    timeoutMs?: number;
    /** If lock file is older than this, consider it stale and remove it. */
    staleMs?: number;
    /** Poll interval while waiting for lock. */
    pollMs?: number;
    /** Optional label to help debugging (written into lock file). */
    label?: string;
}
export declare function withLock<T>(lockFilePath: string, fn: () => Promise<T>, opts?: LockOptions): Promise<T>;
