"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.catchSomeDefect = exports.catchSomeDefect_ = void 0;
const catchAll_1 = require("./catchAll");
const fail_1 = require("./fail");
const unrefine_1 = require("./unrefine");
/**
 * Recovers from some or all of the defects with provided partial 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.
 */
function catchSomeDefect_(fa, f, __trace) {
    return (0, catchAll_1.catchAll_)((0, unrefine_1.unrefineWith_)(fa, f, fail_1.fail), (s) => s, __trace);
}
exports.catchSomeDefect_ = catchSomeDefect_;
/**
 * Recovers from some or all of the defects with provided partial 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.
 *
 * @dataFist catchSomeDefect_
 */
function catchSomeDefect(f, __trace) {
    return (effect) => catchSomeDefect_(effect, f, __trace);
}
exports.catchSomeDefect = catchSomeDefect;
//# sourceMappingURL=catchSomeDefect.js.map