import type { ContentPack } from './refs.js'; import type { ValidationError } from './validate.js'; export type LoadResult = { ok: boolean; errors: ValidationError[]; pack: ContentPack; summary: string; }; /** * Result of loading content from a file. Extends {@link LoadResult} with the * cross-reference `advisories` surfaced by {@link validateGameContent} (likely-mistake * signals — one-way passages, etc. — that never flip `ok`). */ export type LoadFromFileResult = LoadResult & { advisories: ValidationError[]; }; export declare function loadContent(pack: ContentPack): LoadResult; /** * Loads a content pack from a JSON file on local disk, then validates it. * * Pipeline (all local, deterministic — no network, no clock, no RNG): * 1. Read the file. A missing/unreadable file is reported as a structured `file` * error, never a raw fs throw. * 2. Parse the JSON. Malformed JSON is reported as a structured `file` error with a * parse hint (CA-02 boundary discipline) — the caller never sees a raw `SyntaxError`. * 3. Run {@link loadContent} (structural + per-element validation) AND * {@link validateGameContent} (cross-reference validation, deriving registries from * the pack itself). Errors from both are merged; cross-ref advisories are surfaced * separately in `advisories` so they never flip `ok`. * * On any boundary failure (read/parse) the returned `pack` is `{}` and `ok` is false. */ export declare function loadContentFromFile(filePath: string): LoadFromFileResult; //# sourceMappingURL=loader.d.ts.map