"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NoopPolicy = void 0;
const abort_1 = require("./common/abort");
const Executor_1 = require("./common/Executor");
/**
 * A no-op policy, useful for unit tests and stubs.
 */
class NoopPolicy {
    constructor() {
        this.executor = new Executor_1.ExecuteWrapper();
        this.onSuccess = this.executor.onSuccess;
        this.onFailure = this.executor.onFailure;
    }
    async execute(fn, signal = abort_1.neverAbortedSignal) {
        return (0, Executor_1.returnOrThrow)(await this.executor.invoke(fn, { signal }));
    }
}
exports.NoopPolicy = NoopPolicy;//# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/e7fb5e96c0730b9deb70b33781f98e2f35975036/node_modules/cockatiel/dist/NoopPolicy.js.map