Interface TreeIterator<T>

A tree iterator adds the ability to prune the current iteration.

interface TreeIterator<T> {
    [iterator](): IterableIterator<T>;
    next(...args: [] | [undefined]): IteratorResult<T, any>;
    prune(): void;
    return?(value?: any): IteratorResult<T, any>;
    throw?(e?: any): IteratorResult<T, any>;
}

Type Parameters

  • T

Hierarchy

  • IterableIterator<T>
    • TreeIterator

Methods

  • Returns IterableIterator<T>

  • Parameters

    • Rest...args: [] | [undefined]

    Returns IteratorResult<T, any>

  • Parameters

    • Optionalvalue: any

    Returns IteratorResult<T, any>

  • Parameters

    • Optionale: any

    Returns IteratorResult<T, any>