skip 'import ...' nodes when creating variable statement for imports

This commit is contained in:
Vladimir Matveev
2015-04-20 14:17:38 -07:00
parent dcb4c24b43
commit 6e5082658d
15 changed files with 193 additions and 26 deletions

View File

@@ -4880,7 +4880,11 @@ var __param = this.__param || function(index, decorator) { return function (targ
writeLine();
let started = false;
for (let importNode of externalImports) {
if (importNode.kind === SyntaxKind.ExportDeclaration) {
let skipNode =
importNode.kind === SyntaxKind.ExportDeclaration ||
(importNode.kind === SyntaxKind.ImportDeclaration && !(<ImportDeclaration>importNode).importClause)
if (skipNode) {
continue;
}