Skip to content

parseYamlDocument

parseYamlDocument(source, options?): YamlDocument

Defined in: packages/format-yaml/src/parse.ts:58

Parses a YAML string into a yaml.Document (CST-level).

Error-tolerant, as yaml’s own parseDocument is: diagnostics stay on the returned document’s errors, so partially valid source is still inspectable. Hand them to YamlParseError to turn them into a throw. maxAliasCount bounds toJS(), not this call.

string

ParseOptions & DocumentOptions & SchemaOptions

YamlDocument