Readonly
[NODE_A comment before this Document
The document contents.
Errors encountered during parsing.
The [start, value-end, node-end]
character offsets for the part of the
source parsed into this document (undefined if not parsed). The value-end
and node-end
positions are themselves not included in their respective
ranges.
The schema used with the document. Use setSchema()
to change.
Warnings encountered during parsing.
Create a new Alias
node, ensuring that the target node
has the required anchor.
If node
already has an anchor, name
is ignored.
Otherwise, the node.anchor
value will be set to name
,
or if an anchor with that name is already present in the document,
name
will be used as a prefix for a new unique anchor.
If name
is undefined, the generated anchor will use 'a' as a prefix.
Convert any value into a Node
using the current schema, recursively
turning objects into collections.
Optional
options: CreateNodeOptionsOptional
options: CreateNodeOptionsReturns item at path
, or undefined
if not found. By default unwraps
scalar values from their surrounding node; to disable set keepScalar
to
true
(collections are always returned intact).
Optional
keepScalar: booleanChange the YAML version and schema used by the document.
A null
version disables support for directives, explicit tags, anchors, and aliases.
It also requires the schema
option to be given as a Schema
instance value.
Overrides all previously set schema options.
Optional
options: SchemaOptionsA plain JavaScript representation of the document contents
.
Optional
opt: ToJSOptions & { A JSON representation of the document contents
.
Optional
jsonArg: null | stringUsed by JSON.stringify
to indicate the array index or
property name.
Optional
onAnchor: ((value: unknown, count: number) => void)A YAML representation of the document.
Optional
options: ToStringOptions
A comment immediately after this Document