Interface IWhileState<T>

The current state of the while loop while processing the callback function, this is passed to eht callback function.

0.5.0

interface IWhileState<T> {
    isDone: boolean | ((state: IWhileState<T>) => boolean | void | IPromise<boolean | void>);
    iter: number;
    res?: T;
    st: number;
}

Type Parameters

  • T

    Identifies the element type returned by the callback function.

Properties

Properties

isDone: boolean | ((state: IWhileState<T>) => boolean | void | IPromise<boolean | void>)

Callback to enable the caller stop the while loop.

iter: number

The zero-based iteration count, which is increased after each call to the callback.

res?: T

The resolved result value returned by the callback function.

st: number

The number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC, at the beginning of the while loop. This value is set at the beginning of the while loop via utcNow() (Date.now()) and is not updated during the execution of while loop.