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