/** * Atomic JSON writes use a sibling temporary file and rename. Defaults are file mode 0600, * directory mode 0700, and two-space JSON without a trailing newline. */ export interface WriteJsonAtomicOptions { /** File mode for the final file. Default 0o600. */ mode?: number; /** Directory mode if the parent has to be created. Default 0o700. */ dirMode?: number; /** Append a trailing newline. Default false. */ trailingNewline?: boolean; /** `space` arg passed to JSON.stringify. Default 2. */ indent?: number | string; /** Skip mkdir of the parent directory. Default false. */ skipMkdir?: boolean; } export declare function writeJsonAtomic(filePath: string, value: unknown, opts?: WriteJsonAtomicOptions): Promise; export declare function writeJsonAtomicSync(filePath: string, value: unknown, opts?: WriteJsonAtomicOptions): void; /** * Read and parse JSON. Only a genuinely absent file returns `null`; malformed * JSON and filesystem failures surface to the caller. */ export declare function readJsonFile(filePath: string): Promise;