import type { LockOptions } from "proper-lockfile";
interface BaseLockRequest {
    path: string;
    staleMs?: number;
    retries?: LockOptions["retries"];
    onCompromised?: LockOptions["onCompromised"];
}
export interface FileLockRequest extends BaseLockRequest {
    type?: "file";
    lockfilePath?: string;
}
export interface DirectoryLockRequest extends BaseLockRequest {
    type: "directory";
    lockfileName?: string;
    lockfilePath?: string;
}
export type LockRequest = FileLockRequest | DirectoryLockRequest;
export interface AtomicTextWriteOptions {
    lock?: LockRequest | null;
    executable?: boolean;
}
export declare class LockedFileSystem {
    private normalizeLockRequest;
    withLock<T>(request: LockRequest, operation: () => Promise<T>): Promise<T>;
    withLocks<T>(requests: readonly LockRequest[], operation: () => Promise<T>): Promise<T>;
    writeTextFileAtomic(path: string, content: string, options?: AtomicTextWriteOptions): Promise<void>;
    writeJsonFileAtomic(path: string, payload: unknown, options?: Omit<AtomicTextWriteOptions, "executable">): Promise<void>;
    removePath(path: string, options: {
        lock: LockRequest;
        recursive?: boolean;
        force?: boolean;
    }): Promise<void>;
}
export declare const lockedFileSystem: LockedFileSystem;
export {};
//# sourceMappingURL=locked-file-system.d.ts.map