all files / dist/binders/structure/interface/ StructureInterfaceBinder.js

97.3% Statements 36/37
100% Branches 19/19
100% Functions 12/12
96.43% Lines 27/28
2 statements, 3 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37    20× 20× 20×   20× 20×   20× 20× 20× 20× 20× 20× 20× 20×            
"use strict";
var __extends = (this && this.__extends)/* istanbul ignore next */ || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var utils_1 = require("./../../../utils");
var base_1 = require("./../../base");
var base_2 = require("./../base");
var StructureInterfaceBinder = (function (_super) {
    __extends(StructureInterfaceBinder, _super);
    function StructureInterfaceBinder(factory, structure) {
        _super.call(this, new base_2.StructureBaseDefinitionBinder(structure), new base_2.StructureNamedBinder(structure), new base_2.StructureExportableBinder(structure), new base_2.StructureAmbientableBinder(utils_1.objectAssign(structure, { isAmbient: true })), new base_2.StructureTypeParameteredBinder(factory, structure), new base_2.StructureDocumentationedBinder(structure));
        this.factory = factory;
        this.structure = structure;
    }
    StructureInterfaceBinder.prototype.getExtendsTypes = function () {
        var _this = this;
        return (this.structure.extendsTypes || []).map(function (s) { return _this.factory.getTypeFromText(s); });
    };
    StructureInterfaceBinder.prototype.getMembers = function () {
        var _this = this;
        var container = new base_1.InterfaceMemberContainer();
        (_a = container.methods).push.apply(_a, (this.structure.methods || []).map(function (m) { return _this.factory.getInterfaceMethod(m); }));
        (_b = container.properties).push.apply(_b, (this.structure.properties || []).map(function (p) { return _this.factory.getInterfaceProperty(p); }));
        (_c = container.newSignatures).push.apply(_c, (this.structure.newSignatures || []).map(function (s) { return _this.factory.getCallSignature(s); }));
        (_d = container.indexSignatures).push.apply(_d, (this.structure.indexSignatures || []).map(function (s) { return _this.factory.getIndexSignature(s); }));
        (_e = container.callSignatures).push.apply(_e, (this.structure.callSignatures || []).map(function (s) { return _this.factory.getCallSignature(s); }));
        return container;
        var _a, _b, _c, _d, _e;
    };
    return StructureInterfaceBinder;
}(base_1.InterfaceBinder));
exports.StructureInterfaceBinder = StructureInterfaceBinder;
 
//# sourceMappingURL=StructureInterfaceBinder.js.map