all files / dist/writers-new/ VariableWriter.js

100% Statements 21/21
100% Branches 0/0
100% Functions 4/4
100% Lines 21/21
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  15× 15× 15× 15× 15× 15× 15×              
"use strict";
var VariableWriter = (function () {
    function VariableWriter(writer, baseDefinitionWriter, documentationedWriter, exportableWriter, ambientableWriter, typeWithDefaultExpressionWriter, variableDeclarationTypeWriter) {
        this.writer = writer;
        this.baseDefinitionWriter = baseDefinitionWriter;
        this.documentationedWriter = documentationedWriter;
        this.exportableWriter = exportableWriter;
        this.ambientableWriter = ambientableWriter;
        this.typeWithDefaultExpressionWriter = typeWithDefaultExpressionWriter;
        this.variableDeclarationTypeWriter = variableDeclarationTypeWriter;
    }
    VariableWriter.prototype.write = function (def, flags) {
        var _this = this;
        this.baseDefinitionWriter.writeWrap(def, function () {
            _this.documentationedWriter.write(def);
            _this.exportableWriter.writeExportKeyword(def, flags);
            _this.ambientableWriter.writeDeclareKeyword(def);
            _this.variableDeclarationTypeWriter.writeDeclarationType(def.declarationType);
            _this.writer.spaceIfLastNotSpace().write(def.name);
            _this.typeWithDefaultExpressionWriter.write(def, flags, "any");
            _this.writer.write(";");
        });
    };
    return VariableWriter;
}());
exports.VariableWriter = VariableWriter;
 
//# sourceMappingURL=VariableWriter.js.map