do not emit non-exported import declarations that don't have import clause
This commit is contained in:
parent
e4f6f167f6
commit
c38e065b6b
5 changed files with 4 additions and 5 deletions
|
@ -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 ");
|
||||
|
|
|
@ -17,4 +17,3 @@ import "es6ImportWithoutFromClause_0";
|
|||
//// [es6ImportWithoutFromClause_0.d.ts]
|
||||
export declare var a: number;
|
||||
//// [es6ImportWithoutFromClause_1.d.ts]
|
||||
import "es6ImportWithoutFromClause_0";
|
||||
|
|
|
@ -33,5 +33,3 @@ export declare var a: number;
|
|||
//// [es6ImportWithoutFromClauseAmd_1.d.ts]
|
||||
export declare var b: number;
|
||||
//// [es6ImportWithoutFromClauseAmd_2.d.ts]
|
||||
import "es6ImportWithoutFromClauseAmd_0";
|
||||
import "es6ImportWithoutFromClauseAmd_2";
|
||||
|
|
|
@ -16,4 +16,3 @@ require("es6ImportWithoutFromClauseInEs5_0");
|
|||
//// [es6ImportWithoutFromClauseInEs5_0.d.ts]
|
||||
export declare var a: number;
|
||||
//// [es6ImportWithoutFromClauseInEs5_1.d.ts]
|
||||
import "es6ImportWithoutFromClauseInEs5_0";
|
||||
|
|
|
@ -17,4 +17,3 @@ import "es6ImportWithoutFromClauseNonInstantiatedModule_0";
|
|||
export interface i {
|
||||
}
|
||||
//// [es6ImportWithoutFromClauseNonInstantiatedModule_1.d.ts]
|
||||
import "es6ImportWithoutFromClauseNonInstantiatedModule_0";
|
||||
|
|
Loading…
Reference in a new issue