I

IEnumerator<T>

Provides methods to iterate over a collection or list of elements of the same type.
Inheritance Hierarchy

Type Parameters

T

Examples

const e = someList.getEnumerator()
// always move before you access
while (e.moveNext()) {
  // get the current element
  const current = e.current
}

Members

No filters for this type

Properties

Gets the element at the enumerator's current position.
This value is undefined if the enumerator is in initial state (after creation or reset<T>) or has been moved past the end of the represented collection.
readonlyabstract

Methods

Moves this enumerator to the next element.
A newly created enumerator's current position is before the first element. Thus, this method must be called before first access to the current<T> property. The same applies to the state after calling reset<T>.
abstract

Return Value

boolean
true if the enumerator was moved to a valid position
Resets the enumerator to its starting state.
In other words: sets the current position before the first element.
abstract