Skip to content

Improve error messages for computed class property names #42675

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

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Improve error messages for computed class property names #42675

merged 1 commit into from
Feb 18, 2021

Conversation

ZYSzys
Copy link
Contributor

@ZYSzys ZYSzys commented Feb 6, 2021

This PR change the ts(1161) error message to the suggestion message

A computed property name in a class property declaration must have a simple literal type or a unique symbol type.

Fixes #42619

@ghost
Copy link

ghost commented Feb 6, 2021

CLA assistant check
All CLA requirements met.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 6, 2021
@DanielRosenwasser
Copy link
Member

I think we need ' marks around unique symbol because it hints to our localization team not to translate those portions.

@sandersn sandersn merged commit 9950b6e into microsoft:master Feb 18, 2021
@ZYSzys ZYSzys deleted the fix-diagnostic-message branch February 19, 2021 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Improve error messages for computed class property names
4 participants