import type { ZodType } from "zod/v4"; /** Minimal subset of the AJV ConfigSchemaError shape this module actually relies on. */ interface ConfigSchemaError { instancePath: string; message: string | undefined; } export interface IConfigFile { readonly id: string; readonly schema: ZodType; path?(): string; load(): T | null; invalidate?(): void; } export declare class ConfigError extends Error { #private; readonly id: string; readonly schemaErrors: ConfigSchemaError[] | null | undefined; readonly other?: { err: unknown; stage: string; } | undefined; constructor(id: string, schemaErrors: ConfigSchemaError[] | null | undefined, other?: { err: unknown; stage: string; } | undefined); get message(): string; toString(): string; } export type LoadStatus = "ok" | "error" | "not-found"; export type LoadResult = { value?: null; error: ConfigError; status: "error"; } | { value: T; error?: undefined; status: "ok"; } | { value?: null; error?: unknown; status: "not-found"; }; export declare class ConfigFile implements IConfigFile { #private; readonly id: string; readonly schema: ZodType; constructor(id: string, schema: ZodType, configPath?: string); relocate(configPath?: string): ConfigFile; getMtimeMs(): number | null; withValidation(name: string, validate: (value: T) => void): this; createDefault(): T; tryLoad(): LoadResult; load(): T | null; loadOrDefault(): T; path(): string; invalidate(): void; } export {};