@tsdotnet/linked-node-list - v1.4.2
    Preparing search index...

    Class LinkedValueNodeList<T>

    This class covers most LinkedNodeList use cases by assuming the node type includes a '.value' property.

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get unsafeCount(): number

      Returns the tracked number of nodes in the list. Since a LinkedNodeList is unprotected, it is possible to modify the chain and this count could get out of sync. To know the actual number of nodes, call .getCount() to iterate over each node.

      Returns number

    Methods

    • Adds a node with the given value to the end of the list. Becomes the last node.

      Parameters

      • value: T

      Returns this

    • Copies the values of each node to an array (or array-like object).

      Type Parameters

      • TDestination extends ArrayLikeWritable<any>

      Parameters

      • array: TDestination

        The target array.

      • index: number = 0

        The starting index of the target array.

      Returns TDestination

      The target array.

    • Returns an iterable that selects the value of each node.

      Returns Iterable<T>

    • Adds a node with the given value to the start of the list. Becomes the first node.

      Parameters

      • value: T

      Returns this