/** Where a failed background sync is reported (the daemon logs it). */ export declare function setSyncErrorHandler(fn: (err: unknown) => void): void; export declare function deferDurability(on: boolean): void; /** Resolves when every durable write made so far is synced. */ export declare function durable(): Promise; /** * Write by a temporary file and a rename: a reader never sees half a file, even if this * process dies mid-write. `durable` (the default) also fsyncs the file and its directory, * so the write survives a machine crash; that costs milliseconds (about 8 on macOS) and * blocks the caller, so data that the next write replaces anyway can skip it (M35). */ export declare function writeFileAtomic(path: string, data: string | Uint8Array, mode?: number, durable?: boolean): void; export declare function writeJsonAtomic(path: string, value: unknown, durable?: boolean): void; export declare function readJson(path: string): T | undefined;