"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sandboxWith_ = exports.sandboxWith = void 0;
const sandbox_1 = require("./sandbox");
const unsandbox_1 = require("./unsandbox");
/**
 * Companion helper to `sandbox`. Allows recovery, and partial recovery, from
 * errors and defects alike.
 *
 * @ets_data_first sandboxWith_
 */
function sandboxWith(f, __trace) {
    return (self) => sandboxWith_(self, f, __trace);
}
exports.sandboxWith = sandboxWith;
/**
 * Companion helper to `sandbox`. Allows recovery, and partial recovery, from
 * errors and defects alike.
 */
function sandboxWith_(self, f, __trace) {
    return (0, unsandbox_1.unsandbox)(f((0, sandbox_1.sandbox)(self)), __trace);
}
exports.sandboxWith_ = sandboxWith_;
//# sourceMappingURL=sandboxWith.js.map