Skip to content

NestedAsyncIterable

NestedAsyncIterable<T> = Iterable<T | NestedAsyncIterable<T>> | AsyncIterable<T | NestedAsyncIterable<T>>

Defined in: packages/core/src/iterable/async/flatten-deep.ts:8

An iterable whose elements are either T or another iterable of the same shape, to any depth, sync or async at every level.

Written as an explicit union rather than through MaybeAsyncIterable so the recursion sits under an interface, which is what lets TypeScript defer it.

T