/** * Node-only conveniences. * * This is the async edge of the library. The core is sync and pure; everything * that touches a disk or a network is here, so the portable surface never has * to be async "just in case" and browser bundles never pull in `node:fs`. */ import { SchemaBundle, type Schema } from '@idfkit/schemas'; import type { IdfDocument } from './document.js'; import { type ParseOptions, type ParseResult } from './parse/idf.js'; import type { AnyTypeMap, UntypedMap } from './typemap.js'; import { type WriteEpJsonOptions } from './write/epjson.js'; import { type WriteIdfOptions } from './write/idf.js'; /** The schema bundle shipped with `@idfkit/schemas`, created once per process. */ export declare function schemas(): SchemaBundle; export interface LoadOptions extends ParseOptions { /** Force a schema version instead of reading it from the file. */ version?: string; /** Use a specific bundle rather than the default. */ bundle?: SchemaBundle; } /** * Resolve the schema for a file whose version was detected from its contents. * * Exported because callers who parse text themselves still need this step, and * getting it wrong (loading 26.1 for a 9.0 file) silently mis-maps every * positional field rather than failing loudly. */ export declare function schemaFor(detected: string | undefined, options?: LoadOptions): Promise; /** Read and parse an IDF file. */ export declare function loadIdf(path: string, options?: LoadOptions): Promise>; /** Read and parse an IDF file, keeping non-fatal diagnostics. */ export declare function loadIdfWithDiagnostics(path: string, options?: LoadOptions): Promise>; /** Read and parse an epJSON file. */ export declare function loadEpJson(path: string, options?: LoadOptions): Promise>; /** Write a document to an IDF file. */ export declare function saveIdf(document: IdfDocument, path: string, options?: WriteIdfOptions): Promise; /** Write a document to an epJSON file. */ export declare function saveEpJson(document: IdfDocument, path: string, options?: WriteEpJsonOptions): Promise; //# sourceMappingURL=node.d.ts.map