|
|
|
|
|
by Tistron
1353 days ago
|
|
What do you mean with "does not refractor"? Do you mean it doesn't compile, because it doesn't. You need to write either const testVal: MyEnum = "a"
or const testVal = "a" as MyEnum
The latter passes typechecking with invalid values, both change automatically for me if I refractor the symbol values in VS Code. |
|
On the other hand, if MyEnum were actually an enum rather than a union of strings, this problem wouldn't have happened.