Options
All
  • Public
  • Public/Protected
  • All
Menu

A representation of a SchemaNode's path with some utilities to lazy evaluate some attributes

Hierarchy

  • Path

Index

Constructors

  • new Path(name?: string, segments?: PathSegment[], __namedParameters?: { isList: undefined | boolean; isVariant: undefined | boolean }): Path
  • Parameters

    • name: string = ''
    • segments: PathSegment[] = []
    • __namedParameters: { isList: undefined | boolean; isVariant: undefined | boolean } = {}
      • isList: undefined | boolean
      • isVariant: undefined | boolean

    Returns Path

Properties

head: string = ''
segments: PathSegment[] = []
tail: string = ''

Methods

  • add(name: string, isList?: boolean, isVariant?: boolean): Path
  • Append a new path segment to a path

    Parameters

    • name: string
    • isList: boolean = false
    • isVariant: boolean = false

    Returns Path

  • toFullWithoutVariants(): string
  • This can be usefull to retrieve the path relative to server errors or any selection / matching without bothering with the selected variants

    Returns string

  • toString(): string
  • toStringShort(withVariant?: boolean, withList?: boolean): string
  • full path separated by dots without variant selections or indexes. Variants and indexes can still be included with a bracket syntax by passing setting withVariant or withList arguments

    Parameters

    • withVariant: boolean = false

      show variant selections next to their polymorphic node ei: "foo.node[selectedVariant].bar"

    • withList: boolean = false

      show indexes next to their list node ei: "foo.node[0].bar"

    Returns string

  • unshift(name: string, isList?: boolean, isVariant?: boolean): Path
  • Prepend a new path segment to a path

    Parameters

    • name: string
    • isList: boolean = false
    • isVariant: boolean = false

    Returns Path

Generated using TypeDoc