IterationObserver<T>: {
    fail: ((reason: unknown) => void);
    finish: ((completion: T) => void);
    updateState: ((nonFinalValue: T) => void);
}

A valid sequence of calls to the methods of an IterationObserver represents an iteration. A valid sequence consists of any number of calls to updateState with the successive non-final values, followed by a final call to either finish with a successful completion value or fail with the alleged reason for failure. After at most one terminating calls, no further calls to these methods are valid and must be rejected.

Type Parameters

  • T