Skip to content

concatAsync

concatAsync<T>(…iterables): AsyncIterableIterator<T>

Defined in: packages/core/src/iterable/async/concat.ts:16

Lazily chains any number of iterables into one.

The async counterpart of concat. Sources may be freely mixed: an array and a stream can be chained together.

Time complexity: O(1) to construct; iterating the result is O(n) total across every source iterable.

T

…MaybeAsyncIterable<T>[]

The iterables to chain, in order.

AsyncIterableIterator<T>

An iterator yielding every element of the first iterable, then every element of the second, and so on.