//#region src/infra/json-files.d.ts
type WriteTextAtomicBeforeRename = (params: {
  filePath: string;
  tempPath: string;
}) => Promise<void>;
declare const JsonFileReadError: any;
type JsonFileReadError = InstanceType<typeof JsonFileReadError>;
declare function readJsonSync<T = unknown>(...args: any[]): T;
declare function readRootJsonObjectSync<T = unknown>(...args: any[]): any;
declare function readRootJsonSync<T = unknown>(...args: any[]): any;
declare function readRootStructuredFileSync<T = unknown>(...args: any[]): any;
declare function tryReadJsonSync<T = unknown>(pathname: string): T | null;
declare function writeJson<T = unknown>(...args: any[]): Promise<T>;
declare function writeJsonSync<T = unknown>(...args: any[]): T;
declare function writeJsonAtomic<T = unknown>(...args: any[]): Promise<T>;
declare function readJson<T>(filePath: string): Promise<T>;
declare function readJsonFileStrict<T>(filePath: string): Promise<T>;
declare function readJsonIfExists<T>(filePath: string): Promise<T | null>;
declare function readDurableJsonFile<T>(filePath: string): Promise<T | null>;
/**
 * tryReadJson delegates to readJsonIfExists instead of the internal
 * tryReadJsonImpl from @nodmix/fs-safe. The fs-safe implementation retries
 * race conditions before propagating errors; this wrapper keeps the historical
 * null-on-error contract for callers that intentionally treat reads as optional.
 */
declare function tryReadJson<T>(filePath: string): Promise<T | null>;
declare function readJsonFile<T>(filePath: string): Promise<T | null>;
declare function createAsyncLock(...args: any[]): any;
type WriteTextAtomicOptions = {
  mode?: number;
  dirMode?: number;
  trailingNewline?: boolean;
  durable?: boolean;
  beforeRename?: WriteTextAtomicBeforeRename;
  /**
   * Prefix for the staged `<prefix>.<pid>.<uuid>.tmp` file. Defaults to the
   * generic `.fs-safe-replace`; pass a target-specific prefix so an orphaned
   * temp (from a crash between write and rename) is identifiable and reclaimable.
   */
  tempPrefix?: string;
};
declare function writeTextAtomic(filePath: string, content: string, options?: WriteTextAtomicOptions): Promise<void>;
//#endregion
export { writeJsonSync as _, readJson as a, readJsonIfExists as c, readRootJsonSync as d, readRootStructuredFileSync as f, writeJsonAtomic as g, writeJson as h, readDurableJsonFile as i, readJsonSync as l, tryReadJsonSync as m, WriteTextAtomicOptions as n, readJsonFile as o, tryReadJson as p, createAsyncLock as r, readJsonFileStrict as s, JsonFileReadError as t, readRootJsonObjectSync as u, writeTextAtomic as v };