Skip to content

Commit cd06f92

Browse files
TypeScript Botjakebailey
andauthored
🤖 Pick PR #57853 (Revert PR 56161) into release-5.4 (#57854)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
1 parent ca8e720 commit cd06f92

File tree

4 files changed

+1
-31
lines changed

4 files changed

+1
-31
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45377,7 +45377,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4537745377
}
4537845378
else {
4537945379
const text = getTextOfPropertyName(member.name);
45380-
if (isNumericLiteralName(text)) {
45380+
if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
4538145381
error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
4538245382
}
4538345383
}

tests/baselines/reference/enumWithInfinityProperty.errors.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/baselines/reference/enumWithNaNProperty.errors.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/baselines/reference/enumWithNegativeInfinityProperty.errors.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy