Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IterationState<T>

A class to capture the state of an iteration which consists of the array of which is iterated, the current index and the current value - which equals array[index] if index is valid and undefined otherwise. It helps in implementing the previous operator (and even more generic offset operators) by updating the iteration state in the current context to it.previous(). This is a cleaner way than to keep track of the previous value and passing that to expressions bound in the iterator.

Type parameters

  • T

Hierarchy

  • IterationState

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

array

array: Array<T>

index

index: number

Methods

previous

value

  • value(): T
  • Returns T

Generated using TypeDoc