Skip to content

enum error #57672

Description

@tangjfn

🔎 Search Terms

enum

🕗 Version & Regression Information

TypeScript 5.4.x
5.3.x is OK

⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.4.1-rc#code/MYewdgzgLgBApmArgWxgQRgbwFAzzAOQEMCYBeGARgBpd8BJMAMwEswWoBPcmAJmwC+QA

💻 Code

constenumA{NaN=1,Infinity=2}

🙁 Actual behavior

An enum member cannot have a numeric name.(2452)

🙂 Expected behavior

no error here

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions