Interface IteratorObject<T, TReturn, TNext>

    Describes an Iterator produced by the runtime that inherits from the intrinsic Iterator.prototype.

    interface IteratorObject<T, TReturn, TNext> {
        [iterator](): IteratorObject<T, TReturn, TNext>;
        next(...__namedParameters: [] | [TNext]): IteratorResult<T, TReturn>;
        return?(value?: TReturn): IteratorResult<T, TReturn>;
        throw?(e?: any): IteratorResult<T, TReturn>;
    }

    Type Parameters

    • T
    • TReturn = unknown
    • TNext = unknown
    Hierarchy

    Methods