We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Considering how const enum operates at compile-time, it seems odd that the following is not valid:
const enum
const enum Ids { alpha = 1 } interface Foo { [Ids.alpha]: string }
when it should be precisely equivalent to:
interface Foo { [1]: string }
which compiles just fine.
Allow const enum values to be used in computed property specifiers in interface declarations and type literals, just as well-known symbols are today.
The text was updated successfully, but these errors were encountered:
#10770 / #5579
Sorry, something went wrong.
Ah, I missed #10770 because I was filtering on currently open issues, and then #5579 didn't reference const enums in the description.
No branches or pull requests
Considering how
const enum
operates at compile-time, it seems odd that the following is not valid:when it should be precisely equivalent to:
which compiles just fine.
Proposal
Allow
const enum
values to be used in computed property specifiers in interface declarations and type literals, just as well-known symbols are today.The text was updated successfully, but these errors were encountered: