Like an iterator, but with a reset method.

interface Cursor<TVal> {
    moveTo(value: TVal): CursorResult<TVal>;
    next(relativeChange?: number): CursorResult<TVal>;
    reset(): void;
}

Type Parameters

  • TVal

    The type of the value being iterated.

Methods

Methods