all files / dist/writers/ NamedImportPartWriter.js

100% Statements 13/13
100% Branches 4/4
100% Functions 4/4
100% Lines 13/13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  11× 11×              
"use strict";
var NamedImportPartWriter = (function () {
    function NamedImportPartWriter(writer, baseDefinitionWriter) {
        this.writer = writer;
        this.baseDefinitionWriter = baseDefinitionWriter;
    }
    NamedImportPartWriter.prototype.write = function (def) {
        var _this = this;
        this.baseDefinitionWriter.writeWrap(def, function () {
            var alias = def.alias, name = def.name;
            _this.writer.write("" + name);
            if (alias != null && name !== alias)
                _this.writer.write(" as " + alias);
        });
    };
    return NamedImportPartWriter;
}());
exports.NamedImportPartWriter = NamedImportPartWriter;
 
//# sourceMappingURL=NamedImportPartWriter.js.map