all files / dist/utils/ applyMixins.js

100% Statements 10/10
100% Branches 6/6
100% Functions 3/3
100% Lines 10/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  26× 92× 171× 78× 78×       26× 26× 26×        
"use strict";
function applyMixins(derivedCtor, extendsClass, baseCtors) {
    baseCtors.forEach(function (baseCtor) {
        Object.getOwnPropertyNames(baseCtor.prototype).forEach(function (name) {
            if (name !== "constructor" && derivedCtor.prototype[name] == null) {
                var descriptor = Object.getOwnPropertyDescriptor(baseCtor.prototype, name);
                Object.defineProperty(derivedCtor.prototype, name, descriptor);
            }
        });
    });
    derivedCtor.mixins = baseCtors;
    (_a = derivedCtor.mixins).push.apply(_a, (extendsClass.mixins || []));
    var _a;
}
exports.applyMixins = applyMixins;
 
//# sourceMappingURL=applyMixins.js.map