• Returns an async-iterable sequence that invokes the specified factory function whenever a call to [Symbol.asyncIterator] has been made.

    Type Parameters

    • TSource

      The type of the elements in the sequence returned by the factory function, and in the resulting sequence.

    Parameters

    • factory: ((signal?) => AsyncIterable<TSource> | Promise<AsyncIterable<TSource>>)

      Async-iterable factory function to invoke for each call to [Symbol.asyncIterator].

        • (signal?): AsyncIterable<TSource> | Promise<AsyncIterable<TSource>>
        • Parameters

          • Optional signal: AbortSignal

          Returns AsyncIterable<TSource> | Promise<AsyncIterable<TSource>>

    Returns AsyncIterable<TSource>

    An async-iterable sequence whose observers trigger an invocation of the given async-iterable factory function.

Generated using TypeDoc