🤖 Pick PR #57853 (Revert PR 56161) into release-5.4 (#57854)

Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
TypeScript Bot
2024-03-19 15:07:36 -07:00
committed by GitHub
parent ca8e720a36
commit cd06f92c43
4 changed files with 1 additions and 31 deletions

View File

@@ -45377,7 +45377,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
else {
const text = getTextOfPropertyName(member.name);
if (isNumericLiteralName(text)) {
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
}
}