import * as tsplus_module_1 from "@effect/core/io/Exit/operations/isSuccess";
import * as tsplus_module_2 from "@tsplus/stdlib/data/Maybe/definition";
import * as tsplus_module_3 from "@effect/core/stream/Stream/operations/collectWhile";
/**
 * Terminates the stream when encountering the first `Exit.Failure`.
 *
 * @tsplus fluent ets/Stream collectWhileSuccess
 */

export function collectWhileSuccess(self, __tsplusTrace) {
  return tsplus_module_3.collectWhile_(self, exit => tsplus_module_1.isSuccess(exit) ? tsplus_module_2.some(exit.value) : tsplus_module_2.none, __tsplusTrace);
}
//# sourceMappingURL=collectWhileSuccess.mjs.map