import * as tsplus_module_1 from "@effect/core/io/Cause/definition";
import * as tsplus_module_2 from "@effect/core/io/Cause/operations/fold";
import { Both, Die, Interrupt, Stackless, Then } from "@effect/core/io/Cause/definition";
/**
 * Discards all typed failures kept on this `Cause`.
 *
 * @tsplus getter ets/Cause stripFailures
 */

export function stripFailures(self) {
  return tsplus_module_2.fold_(self, () => tsplus_module_1.empty, () => tsplus_module_1.empty, (defect, trace) => new Die(defect, trace), (fiberId, trace) => new Interrupt(fiberId, trace), (left, right) => new Then(left, right), (left, right) => new Both(left, right), (cause, stackless) => new Stackless(cause, stackless));
}
//# sourceMappingURL=stripFailures.mjs.map