Skip to content

Parsed

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:15

The typing of directives fails in TS <= 4.2

Contents extends YamlParsedNode = YamlParsedNode

Strict extends boolean = true

readonly [NODE_TYPE]: symbol

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:21

YamlDocument.[NODE_TYPE]


comment: string | null

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:25

A comment immediately after this Document

YamlDocument.comment


commentBefore: string | null

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:23

A comment before this Document

YamlDocument.commentBefore


contents: Strict extends true ? Contents | null : Contents

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:27

The document contents.

YamlDocument.contents


directives: Directives

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:16

YamlDocument.directives


errors: YAMLError[]

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:30

Errors encountered during parsing.

YamlDocument.errors


options: Required<Omit<ParseOptions & DocumentOptions, "_directives" | "lineCounter" | "version">>

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:31

YamlDocument.options


range: YamlRange

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:17

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.

YamlDocument.range


schema: YamlSchema

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:40

The schema used with the document. Use setSchema() to change.

YamlDocument.schema


warnings: YAMLWarning[]

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:42

Warnings encountered during parsing.

YamlDocument.warnings

add(value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:56

Adds a value to the document.

any

void

YamlDocument.add


addIn(path, value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:58

Adds a value to the document.

Iterable<unknown>

unknown

void

YamlDocument.addIn


clone(): YamlDocument<Contents, Strict>

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:54

Create a deep copy of this Document and its contents.

Custom Node values that inherit from Object still refer to their original instances.

YamlDocument<Contents, Strict>

YamlDocument.clone


createAlias(node, name?): YamlAlias

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:68

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.

Strict extends true ? YamlScalar<unknown> | YamlMap<unknown, unknown> | YamlSeq<unknown> : YamlNode

string

YamlAlias

YamlDocument.createAlias


createNode<T>(value, options?): NodeType<T>

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:73

Convert any value into a Node using the current schema, recursively turning objects into collections.

T = unknown

T

CreateNodeOptions

NodeType<T>

YamlDocument.createNode

createNode<T>(value, replacer, options?): NodeType<T>

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:74

Convert any value into a Node using the current schema, recursively turning objects into collections.

T = unknown

T

CreateNodeOptions | Replacer | null

CreateNodeOptions

NodeType<T>

YamlDocument.createNode


createPair<K, V>(key, value, options?): YamlPair<K, V>

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:79

Convert a key and a value into a Pair using the current schema, recursively wrapping all values as Scalar or Collection nodes.

K extends YamlNode = YamlNode

V extends YamlNode = YamlNode

unknown

unknown

CreateNodeOptions

YamlPair<K, V>

YamlDocument.createPair


delete(key): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:84

Removes a value from the document.

unknown

boolean

true if the item was found and removed.

YamlDocument.delete


deleteIn(path): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:89

Removes a value from the document.

Iterable<unknown, any, any> | null

boolean

true if the item was found and removed.

YamlDocument.deleteIn


get(key, keepScalar?): Strict extends true ? unknown : any

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:95

Returns item at key, 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).

unknown

boolean

Strict extends true ? unknown : any

YamlDocument.get


getIn(path, keepScalar?): Strict extends true ? unknown : any

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:101

Returns 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).

Iterable<unknown, any, any> | null

boolean

Strict extends true ? unknown : any

YamlDocument.getIn


has(key): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:105

Checks if the document includes a value with the key key.

unknown

boolean

YamlDocument.has


hasIn(path): boolean

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:109

Checks if the document includes a value at path.

Iterable<unknown, any, any> | null

boolean

YamlDocument.hasIn


set(key, value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:114

Sets a value in this document. For !!set, value needs to be a boolean to add/remove the item from the set.

any

unknown

void

YamlDocument.set


setIn(path, value): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:119

Sets a value in this document. For !!set, value needs to be a boolean to add/remove the item from the set.

Iterable<unknown, any, any> | null

unknown

void

YamlDocument.setIn


setSchema(version, options?): void

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:127

Change 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.

"1.1" | "1.2" | "next" | null

SchemaOptions

void

YamlDocument.setSchema


toJS(opt?): any

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:129

A plain JavaScript representation of the document contents.

ToJSOptions & object

any

YamlDocument.toJS


toJSON(jsonArg?, onAnchor?): any

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:138

A JSON representation of the document contents.

string | null

Used by JSON.stringify to indicate the array index or property name.

(value, count) => void

any

YamlDocument.toJSON


toString(options?): string

Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/doc/Document.d.ts:140

A YAML representation of the document.

ToStringOptions

string

YamlDocument.toString