/** * @public */ export async function toArray(it: AsyncIterableIterator): Promise { const result: T[] = [] for await (const chunk of it) { result.push(chunk) } return result }