import { AppData } from "../data/app-data"; export type DataFileFormat = "ts" | "js" | "json" | "yaml"; export type ResolvedDataFile = { path: string; basename: string; extension: (typeof AppData.SupportedDataFileExtensions)[number]; format: DataFileFormat; }; export type LoadedDataFile = ResolvedDataFile & { data: T; }; /** * Resolve a basename (no extension) to an existing file among supported formats. * Priority: .ts > .js > .json > .yaml > .yml * Errors if multiple matches exist. */ export declare function resolveDataFile(dir: string, baseName: string): ResolvedDataFile | null; export declare function supportedDataFileNames(baseName: string): string; export declare function isSchemaFileName(name: string): boolean; /** * Load a data file as a plain object. * - .ts / .js: require() and use default export (or module itself) * - .json: JSON.parse * - .yaml / .yml: Bun.YAML.parse */ export declare function loadDataFile(resolved: ResolvedDataFile): T; export declare function resolveAndLoadDataFile(dir: string, baseName: string): LoadedDataFile | null;