Skip to content

Commit 41f6c5e

Browse files
author
Yui T
committed
Only report an error in non ambient context and with no noEmit flag
1 parent 11cac43 commit 41f6c5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21909,7 +21909,8 @@ namespace ts {
2190921909
}
2191021910
}
2191121911

21912-
if (hasModifier(node.parent.parent, ModifierFlags.Export) && compilerOptions.module !== ModuleKind.ES2015) {
21912+
if (compilerOptions.module !== ModuleKind.ES2015 && !compilerOptions.noEmit &&
21913+
!isInAmbientContext(node.parent.parent) && hasModifier(node.parent.parent, ModifierFlags.Export)) {
2191321914
checkESModuleMarker(node.name);
2191421915
}
2191521916

0 commit comments

Comments
 (0)