Prelude API
    Preparing search index...

    Function ofAsyncIterable

    • Creates a channel from an async iterable.

      Type Parameters

      • T

      Parameters

      • asyncIterable: AsyncIterable<T>

        The async iterable to stream values from.

      • cap: number = 0

        Maximum number of pending writes. Defaults to 0.

      • __namedParameters: { signal?: AbortSignal } = {}

      Returns Channel<T>

      A channel that closes after the async iterable is exhausted, or fails if iteration throws.

      T - The type of values in the channel.