interface Parsed {
    [NODE_TYPE]: symbol;
    anchor?: string;
    comment?: null | string;
    commentBefore?: null | string;
    format?: string;
    minFractionDigits?: number;
    range: Range;
    source: string;
    spaceBefore?: boolean;
    srcToken?: FlowScalar | BlockScalar;
    tag?: string;
    type?: Type;
    value: unknown;
    clone(): NodeBase;
    toJSON(arg?: any, ctx?: ToJSContext): any;
    toString(): string;
}

Hierarchy (view full)

Properties

[NODE_TYPE]: symbol
anchor?: string

An optional anchor on this node. Used by alias nodes.

comment?: null | string

A comment on or immediately after this

commentBefore?: null | string

A comment before this

format?: string

By default (undefined), numbers use decimal notation. The YAML 1.2 core schema only supports 'HEX' and 'OCT'. The YAML 1.1 schema also supports 'BIN' and 'TIME'

minFractionDigits?: number

If value is a number, use this value when stringifying this node.

range: Range

The [start, value-end, node-end] character offsets for the part of the source parsed into this node (undefined if not parsed). The value-end and node-end positions are themselves not included in their respective ranges.

source: string

Set during parsing to the source string value

spaceBefore?: boolean

A blank line before this node and its commentBefore

srcToken?: FlowScalar | BlockScalar

The CST token that was composed into this node.

tag?: string

A fully qualified tag, if required

type?: Type

The scalar style used for the node's string representation

value: unknown

Methods

  • Create a copy of this node.

    Returns NodeBase

  • A plain JS representation of this node

    Parameters

    • Optionalarg: any
    • Optionalctx: ToJSContext

    Returns any

  • Returns string