Dont consider global augmentation top-level members as having the export modifier (#23846)

* Dont consider global argumentation top-level members as having the export modifier

* Remove unneeded test parts from repro
This commit is contained in:
Wesley Wigham authored and GitHub committed 2018-05-03 11:21:11 -07:00
1 parent b467cd8a99
commit 19a985eb24
5 files changed
+82 -1

No files matched your search

+1 -1
View File
@@ -21319,7 +21319,7 @@ namespace ts {
n.parent.kind !== SyntaxKind.ClassDeclaration &&
n.parent.kind !== SyntaxKind.ClassExpression &&
n.flags & NodeFlags.Ambient) {
if (!(flags & ModifierFlags.Ambient)) {
if (!(flags & ModifierFlags.Ambient) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) {
// It is nested in an ambient context, which means it is automatically exported
flags |= ModifierFlags.Export;
}