/** * Input boundary. * * Everything entering the compiler arrives as an untrusted string or an * untrusted object. Parsing happens here and only here, with YAML alias * expansion bounded so a small document cannot expand into a large one. */ export interface ParseOptions { /** Source label used in diagnostics (`--out` name, filename, or ``). */ source?: string; /** Force a parser instead of detecting from content. */ format?: 'json' | 'yaml'; } /** * Parse a spec from a string or pass through an already-parsed object. * * JSON is detected by its first non-whitespace character; anything else is * parsed as YAML, which is a superset of JSON. Parse failures are reported as * `SPEC_PARSE_ERROR` with the source label and, for YAML, the offending line. */ export declare function parseSpec(input: unknown, options?: ParseOptions): unknown; //# sourceMappingURL=parse.d.ts.map