UNPKG

@jsdsl/iterator

Version:

A collection of classes that allow iteration over a predefined collection of elements.

9 lines (8 loc) 254 B
import { Iterable } from "./iterable"; export interface Iterator<E, U = undefined> extends Iterable<E, U> { hasNext(): boolean; next(): E | U; forEachRemaining(callback: (element: E) => any): void; remove?(): E | U; reset?(): void; }