Options
All
  • Public
  • Public/Protected
  • All
Menu

Implements an iterator for a Linked List including the element index, that obeys the Iterator protocol.

Type parameters

  • T

    the type of each value in the list

Hierarchy

  • ListIteratorWithIndex

Index

Constructors

Properties

Methods

Constructors

Properties

_index: number

Methods

  • Return the current iterator. This seems illogical, but this is how Array IterableIterators work, so we need to be compatible. Perhaps a better implementation would be to return a new iterator that begins from the current position.

    Returns ListIteratorWithIndex<T>

  • next(): IteratorResult<[number, T], any>
  • Returns the next item in the iteration.

    Returns IteratorResult<[number, T], any>

Generated using TypeDoc