Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T = unknown

Hierarchy

Index

Constructors

constructor

  • new Scalar<T>(value: T): Scalar<T>
  • Type parameters

    • T = unknown

    Parameters

    • value: T

    Returns Scalar<T>

Properties

Readonly [NODE_TYPE]

[NODE_TYPE]: symbol

Optional anchor

anchor?: string

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

Optional comment

comment?: null | string

A comment on or immediately after this

Optional commentBefore

commentBefore?: null | string

A comment before this

Optional format

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'

Optional minFractionDigits

minFractionDigits?: number

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

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.

Optional source

source?: string

Set during parsing to the source string value

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

Optional type

type?: Type

The scalar style used for the node's string representation

value

value: T

Methods

clone

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

    Returns NodeBase

toJSON

  • toJSON(arg?: any, ctx?: ToJSContext): any
  • Parameters

    • Optional arg: any
    • Optional ctx: ToJSContext

    Returns any

toString

  • toString(): string
  • Returns string

Generated using TypeDoc