Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new Alias(source: string): Alias
  • Parameters

    • source: string

    Returns Alias

Properties

Readonly [NODE_TYPE]

[NODE_TYPE]: symbol

Optional anchor

anchor?: undefined

Optional comment

comment?: null | string

A comment on or immediately after this

Optional commentBefore

commentBefore?: null | string

A comment before this

Optional range

range?: null | 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

source: string

Optional spaceBefore

spaceBefore?: boolean

A blank line before this node and its commentBefore

Optional srcToken

srcToken?: Token

The CST token that was composed into this node.

Optional tag

tag?: string

A fully qualified tag, if required

Methods

clone

  • clone(): NodeBase
  • Create a copy of this node.

    Returns NodeBase

resolve

  • 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>

toJSON

  • toJSON(_arg?: unknown, ctx?: ToJSContext): null | {}
  • Parameters

    • Optional _arg: unknown
    • Optional ctx: ToJSContext

    Returns null | {}

toString

  • toString(ctx?: StringifyContext, _onComment?: () => void, _onChompKeep?: () => void): string
  • Parameters

    • Optional ctx: StringifyContext
    • Optional _onComment: () => void
        • (): void
        • Returns void

    • Optional _onChompKeep: () => void
        • (): void
        • Returns void

    Returns string

Generated using TypeDoc