mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user