// ets_tracing: off import * as Ex from "../../../../Exit/index.js" import * as O from "../../../../Option/index.js" import type * as C from "../core.js" import * as CollectWhile from "./collectWhile.js" /** * Terminates the stream when encountering the first `Exit.Failure`. */ export function collectWhileSuccess( self: C.Stream> ): C.Stream { return CollectWhile.collectWhile_( self, Ex.fold( () => O.none, (r) => O.some(r) ) ) }