-
Notifications
You must be signed in to change notification settings - Fork 13.1k
fix(refactor): block "Move to file" for statements in unbraced if/else #62804
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2840,6 +2840,10 @@ | |||||||||||||||||||
| "category": "Error", | ||||||||||||||||||||
| "code": 2552 | ||||||||||||||||||||
| }, | ||||||||||||||||||||
| "Cannot find name '{0}'. '{1}' only refers to a type, but is being used as a value here.": { | ||||||||||||||||||||
| "category": "Error", | ||||||||||||||||||||
| "code": 2888 | ||||||||||||||||||||
| }, | ||||||||||||||||||||
| "Computed values are not permitted in an enum with string valued members.": { | ||||||||||||||||||||
|
Comment on lines
+2843
to
2847
|
||||||||||||||||||||
| "Cannot find name '{0}'. '{1}' only refers to a type, but is being used as a value here.": { | |
| "category": "Error", | |
| "code": 2888 | |
| }, | |
| "Computed values are not permitted in an enum with string valued members.": { | |
| "Computed values are not permitted in an enum with string valued members.": { | |
| "category": "Error", | |
| "code": 2553 | |
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This checker enhancement is unrelated to the PR's stated purpose of fixing the "Move to file" refactor for unbraced if/else statements. This appears to improve error messages when type aliases are used as values, which matches the
typeAliasUsedAsValue.tstest but has no connection to the refactoring bug fix. These changes should be in a separate PR.