export interface FileLockOptions { lockWaitMs?: number; staleLockMs?: number; 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; };