"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Ruleset_1 = require("./Ruleset");
var SetRules;
(function (SetRules) {
    /**
     * This is an TS 1.6+ TypeGuard as described here: https://www.typescriptlang.org/docs/handbook/advanced-types.html
     */
    function isSetRules(o) {
        return o.rulesets !== undefined
            && o.rulesets !== undefined
            && Array.isArray(o.rulesets)
            && o.rulesets.filter(ruleset => !Ruleset_1.Ruleset.isRuleset(ruleset)).length === 0;
    }
    SetRules.isSetRules = isSetRules;
    function validateSetRules(o) {
        return isSetRules(o)
            && o.rulesets.filter(ruleset => !Ruleset_1.Ruleset.validateRuleset(ruleset)).length === 0;
    }
    SetRules.validateSetRules = validateSetRules;
})(SetRules = exports.SetRules || (exports.SetRules = {}));
//# sourceMappingURL=SetRules.js.map