"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatusUnionHandler = void 0;
const asynchronous_handlers_1 = require("asynchronous-handlers");
const StatusHandler_1 = require("./StatusHandler");
/**
 * A {@link StatusHandler} implementing a {@link UnionHandler}.
 */
class StatusUnionHandler extends StatusHandler_1.StatusHandler {
    constructor(handlers, requireAll = false, ignoreErrors = !requireAll) {
        // Workaround for the fact that we want the same behaviour as a UnionHandler
        let combine;
        const INTERNAL_CLASS = class extends asynchronous_handlers_1.UnionHandler {
            async combine(results) {
                return combine(results);
            }
        };
        super(new INTERNAL_CLASS(handlers, requireAll, ignoreErrors));
        combine = this.combine.bind(this);
    }
}
exports.StatusUnionHandler = StatusUnionHandler;
//# sourceMappingURL=StatusUnionHandler.js.map