/** * Terminates the stream when encountering the first `Exit.Failure`. * * @tsplus getter effect/core/stream/Stream collectWhileSuccess */ export function collectWhileSuccess( self: Stream> ): Stream { return self.collectWhile((exit) => exit.isSuccess() ? Maybe.some(exit.value) : Maybe.none) }