method Stream.toArray
Stream.toArray(): Promise<Result<T, E>[]>

Collects all results emitted by the stream into an array of Result objects, which can represent either successful values or errors. This method allows you to see the full outcome of the stream processing, including both successes and errors, without throwing an aggregate error.

Return Type

Promise<Result<T, E>[]>

Usage

import { type Stream } from ".";