Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ComboNode<TValid, TNoteContent>

Type parameters

Hierarchy

Index

Constructors

  • new ComboNode<TValid, TNoteContent>(__namedParameters: { end: number; keys: KeyNode<boolean, TNoteContent>[]; seps: Token<boolean, SEPARATOR, string, TOKEN_TYPE[]>[]; start: number }): ComboNode<TValid, TNoteContent>

Properties

end: number
keys: KeyNode<boolean, TNoteContent>[]
seps: Token<boolean, SEPARATOR, string, TOKEN_TYPE[]>[]

The separators. They're always valid.

start: number
type: COMBO
valid: boolean

Accessors

  • get firstKey(): KeyNode<boolean, TNoteContent>
  • get firstValidKey(): undefined | Token<true, KEY, string, never>
  • get lastKey(): KeyNode<boolean, TNoteContent>
  • get lastValidKey(): undefined | KeyNode<true, TNoteContent>

Methods

  • Returns the canonical version string version of the node.

    The main purpose is to provide some definitive string versions of nodes so that we can check the equality of two shortcuts. This should ideally be done at the ChainNode level since e.g. key parses to Chain(Combo(Key(key))) but all it's node's string versions equal each other (i.e. Chain(Combo(Key(key))) === Key(key)).

    The string returned should also parse back to exactly the same nodes (again, at the @ChainNode level).

    See Token.stringify for how this works at the token level.

    Parameters

    Returns string

Generated using TypeDoc