-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Updated error message for TS2539 #39827
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
Conversation
Maybe "because it is not a writable binding" or something - immutable really does imply the entire structure is frozen. Maybe @sandersn has a suggestion. |
is real jargon-y, perhaps we could narrow down the error handling and explicitly check that it's an import, then offer something like:
|
I agree, the baselines show that the error happens on, at least, If the error distinguishes those cases, you could probably get away with a very simple error, something like:
It might even be parametrisable:
Edit: But that assumes you can retrieve the keyword fairly easily. Probably 5 different messages is still the right way to go so that it's easier to localise. |
|
I agree with the word declaration. Another variation can be |
@hailin-zhang do you want to keep working on this? |
@sandersn sorry for the lack of an update, I am OK if somebody wants to take this ticket, if not then I can circle back once I have more time |
I switched to multiple errors, and, since |
Fixes #39751
There were a number of different cases using this error code outside of the one reported so I used a more generic error message. Please let me know if a more descriptive message should be used 👍
Thanks!