import { go } from '@blackglory/go' import { Awaitable } from 'justypes' export function concatAsync( iterable: Iterable | AsyncIterable , ...otherIterables: Array> | AsyncIterable>> ): AsyncIterableIterator | Awaited> { return go(async function* () { for (const iter of [iterable, ...otherIterables]) { for await (const element of iter) { yield element } } }) }