🤖 Pick PR #61210 (Fix mistakenly disallowed default e...) into release-5.8 (#61237)

Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
TypeScript Bot
2025-02-25 22:46:11 -08:00
committed by GitHub
parent f4a3a8ae67
commit 8fdbd54160
10 changed files with 69 additions and 1 deletions

View File

@@ -47974,7 +47974,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return;
}
if (compilerOptions.erasableSyntaxOnly && !(node.flags & NodeFlags.Ambient)) {
if (compilerOptions.erasableSyntaxOnly && node.isExportEquals && !(node.flags & NodeFlags.Ambient)) {
error(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled);
}
const container = node.parent.kind === SyntaxKind.SourceFile ? node.parent : node.parent.parent as ModuleDeclaration;