import * as fs from 'fs'; export declare function sleepSync(ms: number): void; export declare function ensureLockTarget(filePath: string, initialContent?: string, dirMode?: number): void; export declare function atomicWriteFileSync(filePath: string, content: string, options?: fs.WriteFileOptions): void; export declare function atomicWriteJsonSync(filePath: string, data: unknown): void; export interface FileLockOptions { staleMs?: number; acquireTimeoutMs?: number; realpath?: boolean; } export declare function withFileLock(filePath: string, fn: (heartbeat: () => void) => T, opts?: FileLockOptions): T; export declare function withFileLockAsync(filePath: string, fn: (heartbeat: () => void) => Promise | T, opts?: FileLockOptions): Promise;