You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constoption2='option2';constoption3='option3'asconst;exportenumTestEnum{Option1='option1',Option2=option2,// <<< no errors hereOption3=option3,// <<< ts(18033) error here}
π Actual behavior
Blocked by ts(18033) error
π Expected behavior
No ts(18033) error
Additional information about the issue
When string variable created as const it's impossible to use it as an enum value because of ts(18033) error.
As far as I'm aware this behaviour should've been implemented as part of this issue #40793
The text was updated successfully, but these errors were encountered:
π Search Terms
enum const string computed value 18033
π Version & Regression Information
I tried 2 TS versions, reproducible with both:
β― Playground Link
https://www.typescriptlang.org/play/?#code/MYewdgzgLgBCAOUCW4BMMC8MDkDluwG4AoUSWPFMAZkx0vGuxgEMIYzoTiBTAD3ggATrB5gArgFsYAFR7QAohOkBvYjBgB5RFQCMdXDvC7sAGnVajYdFgbXTMAPSOYAHncwwIGDyFDh7AAWvjwW2vg0dHbUDs5uHlAQABS6ABwADNTUAJQ+fsIwwUKhAL5AA
π» Code
π Actual behavior
Blocked by
ts(18033)
errorπ Expected behavior
No
ts(18033)
errorAdditional information about the issue
When string variable created
as const
it's impossible to use it as an enum value because ofts(18033)
error.As far as I'm aware this behaviour should've been implemented as part of this issue #40793
The text was updated successfully, but these errors were encountered: