mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Only report an error in non ambient context and with no noEmit flag
This commit is contained in:
parent
11cac43c34
commit
41f6c5ef6b
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user