-
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
Better error report for equals instead of colon in object literals #25259
Comments
maybe provide a quick fix for that? |
@Kingwl Maybe, but I think reporting a better error first like
would be more ideal. Keep in mind that if there is already a let x = { foo: bar = 10 }; |
Related #25201 |
after track, i saw this pattern is included in |
New message is
Open to switching it in the future to
Thanks @a-tarasyuk! |
@DanielRosenwasser I could change the message in PR :(. I'll open a new PR for the new message. Is it ok? |
I felt bad making you wait any longer to get an already-good change in. 😬 Do you think the new message is even better? What about you @sandersn? |
Ehhhhh, it's slightly simpler but also slightly longer. I wouldn't change it if I were me, but, like, half of that is because the longer wording has a horizontal scroll bar on my browser. |
It's up to you @a-tarasyuk, I'd merge it in if you think it's good and send the change. |
@DanielRosenwasser Don't worry about that 😄 . I think it is good, I'll change the message. |
TypeScript Version: 3.0.0-dev.201xxxxx
Search Terms: object literal cannot find name equals colon
Code
Expected behavior:
Use a : please!
Actual behavior:
Playground Link: http://www.typescriptlang.org/play/#src=const%20container%20%3D%20%7B%0D%0A%20%20%20%20a%3A%20%22apple%22%2C%0D%0A%20%20%20%20b%20%3D%20%22banana%22%2C%0D%0A%7D%3B
Related Issues: #25257
The text was updated successfully, but these errors were encountered: