mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Reuse existing var
This commit is contained in:
@@ -1418,7 +1418,7 @@ namespace ts {
|
||||
else {
|
||||
const parent = node.parent as SourceFile;
|
||||
|
||||
if (!isExternalModule(<SourceFile>node.parent)) {
|
||||
if (!isExternalModule(parent)) {
|
||||
file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Global_module_exports_may_only_appear_in_module_files));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user