do not emit non-exported import declarations that don't have import clause

This commit is contained in:
Vladimir Matveev
2015-03-17 18:00:40 -07:00
parent e4f6f167f6
commit c38e065b6b
5 changed files with 4 additions and 5 deletions

View File

@@ -919,6 +919,10 @@ module ts {
}
function writeImportDeclaration(node: ImportDeclaration) {
if (!node.importClause && !(node.flags & NodeFlags.Export)) {
// do not write non-exported import declarations that don't have import clauses
return;
}
emitJsDocComments(node);
if (node.flags & NodeFlags.Export) {
write("export ");