all files / dist/writers/ NamedImportPartsWriter.js

100% Statements 17/17
100% Branches 2/2
100% Functions 5/5
100% Lines 17/17
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  11× 11×                
"use strict";
var NamedImportPartsWriter = (function () {
    function NamedImportPartsWriter(writer, namedImportPartWriter) {
        this.writer = writer;
        this.namedImportPartWriter = namedImportPartWriter;
    }
    NamedImportPartsWriter.prototype.write = function (namedImports) {
        if (namedImports.length === 0)
            return;
        this.writer.write("{");
        this.writeNamedImportParts(namedImports);
        this.writer.write("}");
    };
    NamedImportPartsWriter.prototype.writeNamedImportParts = function (namedImports) {
        var _this = this;
        namedImports.forEach(function (namedImport, i) {
            _this.writer.conditionalWrite(i !== 0, ", ");
            _this.namedImportPartWriter.write(namedImport);
        });
    };
    return NamedImportPartsWriter;
}());
exports.NamedImportPartsWriter = NamedImportPartsWriter;
 
//# sourceMappingURL=NamedImportPartsWriter.js.map