Skip to content

Commit 6f3f690

Browse files
committed
revert back fix for implicit exports of imports
1 parent 0f323ea commit 6f3f690

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/compiler/binder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ namespace ts {
355355
function declareModuleMember(node: Declaration, symbolFlags: SymbolFlags, symbolExcludes: SymbolFlags): Symbol {
356356
const hasExportModifier = getCombinedNodeFlags(node) & NodeFlags.Export;
357357
if (symbolFlags & SymbolFlags.Alias) {
358-
if (node.kind === SyntaxKind.ExportSpecifier || (node.kind === SyntaxKind.ImportEqualsDeclaration && (hasExportModifier || container.flags & NodeFlags.ExportContext))) {
358+
if (node.kind === SyntaxKind.ExportSpecifier || (node.kind === SyntaxKind.ImportEqualsDeclaration && hasExportModifier)) {
359359
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
360360
}
361361
else {

tests/baselines/reference/newNamesInGlobalAugmentations1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ declare global {
1313
}
1414
class Cls {x}
1515
let [a, b]: number[];
16-
import X = M.M1.x;
16+
export import X = M.M1.x;
1717
}
1818

1919
//// [main.ts]

tests/baselines/reference/newNamesInGlobalAugmentations1.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ declare global {
2626
>a : Symbol(a, Decl(f1.d.ts, 11, 9))
2727
>b : Symbol(b, Decl(f1.d.ts, 11, 11))
2828

29-
import X = M.M1.x;
29+
export import X = M.M1.x;
3030
>X : Symbol(X, Decl(f1.d.ts, 11, 25))
3131
>M : Symbol(M, Decl(f1.d.ts, 1, 10))
3232
>M1 : Symbol(M.M1, Decl(f1.d.ts, 3, 17))

tests/baselines/reference/newNamesInGlobalAugmentations1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ declare global {
2626
>a : number
2727
>b : number
2828

29-
import X = M.M1.x;
29+
export import X = M.M1.x;
3030
>X : number
3131
>M : typeof M
3232
>M1 : typeof M.M1

tests/cases/compiler/newNamesInGlobalAugmentations1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare global {
1212
}
1313
class Cls {x}
1414
let [a, b]: number[];
15-
import X = M.M1.x;
15+
export import X = M.M1.x;
1616
}
1717

1818
// @filename: main.ts

0 commit comments

Comments
 (0)