import type { ManifestProblem } from "../schemas/system.js"; import { type Conversion, type Granularity } from "./conversions.js"; import { type IdKeys } from "./passthrough.js"; export interface DocumentShape { readonly history: readonly Conversion[]; readonly granularity: Granularity; } type Report = (problem: ManifestProblem) => void; export type DocumentParse = { readonly kind: "whole"; readonly parse: (raw: unknown, report: Report) => T | undefined; } | { readonly kind: "entries"; readonly entry: (raw: unknown, report: Report) => (T extends readonly (infer E)[] ? E : never) | undefined; readonly idKeys?: IdKeys; }; export interface DocumentRead { readonly value: T | undefined; readonly carry: (updated: T) => unknown; readonly problems: readonly ManifestProblem[]; } export declare const readDocument: (text: string, shape: DocumentShape, how: DocumentParse, checkSettles?: boolean) => DocumentRead; export {}; //# sourceMappingURL=read.d.ts.map