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
2018-05-03 11:21:11 -07:00
committed by GitHub
parent b467cd8a99
commit 19a985eb24
5 changed files with 82 additions and 1 deletions

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;
}