interface Parsed {
    [NODE_TYPE]: symbol;
    anchor?: undefined;
    comment?: null | string;
    commentBefore?: null | string;
    range: Range;
    source: string;
    spaceBefore?: boolean;
    srcToken?: FlowScalar & {
        type: "alias";
    };
    tag?: string;
    clone(): NodeBase;
    resolve(doc: yaml.Document<yaml.Node>):
        | undefined
        | Scalar<unknown>
        | YAMLMap<unknown, unknown>
        | YAMLSeq<unknown>;
    toJSON(_arg?: unknown, ctx?: ToJSContext): null | {};
    toString(ctx?: StringifyContext, _onComment?: (() => void), _onChompKeep?: (() => void)): string;
}

Hierarchy (view full)

Properties

[NODE_TYPE]: symbol
anchor?: undefined
comment?: null | string

A comment on or immediately after this

commentBefore?: null | string

A comment before this

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
spaceBefore?: boolean

A blank line before this node and its commentBefore

srcToken?: FlowScalar & {
    type: "alias";
}

The CST token that was composed into this node.

tag?: string

A fully qualified tag, if required

Methods

  • Create a copy of this node.

    Returns NodeBase

  • Resolve the value of this alias within doc, finding the last instance of the source anchor before this node.

    Parameters

    Returns
        | undefined
        | Scalar<unknown>
        | YAMLMap<unknown, unknown>
        | YAMLSeq<unknown>

  • A plain JS representation of this node

    Parameters

    • Optional_arg: unknown
    • Optionalctx: ToJSContext

    Returns null | {}

  • Parameters

    • Optionalctx: StringifyContext
    • Optional_onComment: (() => void)
        • (): void
        • Returns void

    • Optional_onChompKeep: (() => void)
        • (): void
        • Returns void

    Returns string