Interface AsyncIteratorObject<T, TReturn, TNext>

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

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

    Type Parameters

    • T
    • TReturn = unknown
    • TNext = unknown
    Hierarchy

    Methods