Skip to content

parse

parse(src, reviverOrOpts?, _opts?): unknown

Defined in: src/yaml-compat.ts:144

Multi-document calibration (checked against real yaml@2.9, not assumed): YAML.parse() on a source with more than one document THROWS — "Source contains multiple documents; please use YAML.parseAllDocuments()" — it does not silently return the first document. Our own parse() (see ./index.ts) also throws on a second document, so this divergence-prone case is naturally aligned with no special-casing needed here.

string

Reviver | Record<string, unknown>

Record<string, unknown>

unknown