import * as tsplus_module_1 from "@tsplus/stdlib/data/Maybe/definition";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/catchSomeDefect";
/**
 * Recovers from all defects with provided function.
 *
 * **WARNING**: There is no sensible way to recover from defects. This
 * method should be used only at the boundary between Effect and an external
 * system, to transmit information on a defect for diagnostic or explanatory
 * purposes.
 *
 * @tsplus fluent ets/Effect catchAllDefect
 */

export function catchAllDefect_(self, f, __tsplusTrace) {
  return tsplus_module_2.catchSomeDefect_(self, d => tsplus_module_1.some(f(d)), __tsplusTrace);
}
/**
 * Recovers from all defects with provided function.
 *
 * **WARNING**: There is no sensible way to recover from defects. This
 * method should be used only at the boundary between Effect and an external
 * system, to transmit information on a defect for diagnostic or explanatory
 * purposes.
 *
 * @tsplus static ets/Effect/Aspects catchAllDefect
 */

export const catchAllDefect = (f, __tsplusTrace) => self => catchAllDefect_(self, f, __tsplusTrace);
//# sourceMappingURL=catchAllDefect.mjs.map