diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 7777b30bdd1..2cc48c02947 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1417,7 +1417,7 @@ namespace ts { } else { const parent = node.parent as SourceFile; - + if (!isExternalModule(node.parent)) { file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Global_module_exports_may_only_appear_in_module_files)); return;