export interface FileLockOptions { lockWaitMs?: number; staleLockMs?: number; /** * Durable writers wait long enough to reclaim a fresh dead owner. Hot paths * may opt out and handle a short best-effort timeout themselves. */ reclaimFreshDeadOwner?: boolean; } export interface AtomicJsonLineOptions { mode?: number; lock?: FileLockOptions; } export declare function withFileLockSync(filePath: string, action: () => T, options?: FileLockOptions): T; export declare function writeJsonFileAtomically(filePath: string, value: unknown, options?: { mode?: number; }): void; export declare function writeTextFileAtomically(filePath: string, content: string, options?: { mode?: number; }): void; export declare function updateJsonFileAtomically(filePath: string, parse: (value: unknown) => T | null, update: (current: T | null) => T | null, options?: { lock?: FileLockOptions; }): T | null; export declare function appendUniqueJsonLineAtomically(filePath: string, value: T, parse: (value: unknown) => T | null, options?: AtomicJsonLineOptions): { value: T; appended: boolean; }; //# sourceMappingURL=atomic-json-file.d.ts.map