Collects all successful values emitted by the stream into an array. If any
errors were collected during the stream processing, they will be thrown as
an AggregateError containing all collected errors.
Return Type
Promise<T[]>
Throws
AggregateError
If any errors were collected during the stream processing.