Interface AsyncIterableExt<T>

Extended Asynchronous Iterable.

interface AsyncIterableExt<T> {
    first: Promise<undefined | T>;
    catch(cb: ((error: any, ctx: IErrorContext<T>) => void)): AsyncIterableExt<T>;
}

Type Parameters

  • T

Hierarchy

  • AsyncIterable<T>
    • AsyncIterableExt

Properties

Methods

Properties

first: Promise<undefined | T>

A getter that creates a new iterator, iterates to the first element and returns the value.

It is to simplify accessing value of single-element iterables.

  • first element / Promise produced by the iterable;
  • Promise<undefined>, if the iterable produced nothing.

Methods