Suppress verbatimModuleSyntax error on ambient export default (#52414)

This commit is contained in:
Andrew Branch
2023-01-25 10:22:56 -08:00
committed by GitHub
parent 43ecac801b
commit 022516e24d
11 changed files with 72 additions and 4 deletions

View File

@@ -43901,6 +43901,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
const isIllegalExportDefaultInCJS = !node.isExportEquals &&
!(node.flags & NodeFlags.Ambient) &&
compilerOptions.verbatimModuleSyntax &&
(moduleKind === ModuleKind.CommonJS || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS);