mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 10:58:20 -05:00
Only report an error in non ambient context and with no noEmit flag
This commit is contained in:
@@ -21909,7 +21909,8 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
if (hasModifier(node.parent.parent, ModifierFlags.Export) && compilerOptions.module !== ModuleKind.ES2015) {
|
||||
if (compilerOptions.module !== ModuleKind.ES2015 && !compilerOptions.noEmit &&
|
||||
!isInAmbientContext(node.parent.parent) && hasModifier(node.parent.parent, ModifierFlags.Export)) {
|
||||
checkESModuleMarker(node.name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user