TypeScript API / laikacms/core / LaikaStream / runCollectForwarding
Function: runCollectForwarding()
ts
function runCollectForwarding<A, D, R>(self, emit): Effect<{
data: readonly A[];
done: D;
}, LaikaError<ErrorCode, number>, R>;Drain a child LaikaStream, forwarding every recoverableError and progress event to the given outer emit (data and the done value are returned to the caller). Use this when a higher-level repository's stream delegates to a lower-level stream and wants the inner repo's warnings to flow through its own outer stream — otherwise the lower-level's recoverableErrors die at the boundary because runCollect returns them but the caller almost always discards them.
Type Parameters
| Type Parameter |
|---|
A |
D extends LaikaDone |
R |
Parameters
| Parameter | Type |
|---|---|
self | LaikaStream<A, D, R> |
emit | LaikaMetadataEmit |
Returns
Effect<{ data: readonly A[]; done: D; }, LaikaError<ErrorCode, number>, R>