-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
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
Poor error message for computed string enums #25896
Comments
A PR would be appreciated. |
@mhegazy I can try this? |
go for it. |
Thanks, can you give me a direction on this? Will it be the |
Error messages are defined in https://github.com/Microsoft/TypeScript/blob/master/src/compiler/diagnosticMessages.json. you will need to create a new error message, build ( |
@HarshKhatore are you still pursuing this. If not, then I would like to give it a try. |
Can I try this one? |
@mhegazy Hi, I try this but I need some help. I create a new error message in diagnosticMessages.json but I don't know wich function in checker I should put the new error message. |
Should this error cover this case?: |
I am trying to figure this out, but man am I starting to feel stupid.
How can I find out if I would love to solve this, but need some help. |
Sorry but I didn't notice there's already a PR. Wasted effort. 😞 |
Hi @DanielRosenwasser , I've one question: enum Foo {
A = 5
}
enum Bar {
B = Foo.A,
} Is |
I'm not sure, I think constant but you'd need to check the compiler source. |
@DanielRosenwasser |
https://twitter.com/larymagal/status/1021741263358443520
As a more basic example:
Currently we give the error
However, we should give an error like
The text was updated successfully, but these errors were encountered: