|
1 | 1 | /* @internal */
|
2 | 2 | namespace ts.codefix {
|
3 |
| - const fixId = "returnValueSurmise"; |
| 3 | + const fixId = "returnValueCorrect"; |
4 | 4 | const fixIdAddReturnStatement = "fixAddReturnStatement";
|
5 | 5 | const fixIdRemoveBlockBodyBrace = "fixRemoveBlockBodyBrace";
|
6 | 6 | const fixIdReplaceBraceWithParen = "fixReplaceBraceWithParen";
|
@@ -198,21 +198,21 @@ namespace ts.codefix {
|
198 | 198 |
|
199 | 199 | function getActionForfixAddReturnStatement(context: CodeFixContext, declaration: FunctionLikeDeclaration, expression: Expression) {
|
200 | 200 | const changes = textChanges.ChangeTracker.with(context, t => addReturnStatement(t, context.sourceFile, declaration, expression));
|
201 |
| - return createCodeFixAction(fixId, changes, Diagnostics.Add_a_return_statement, fixIdAddReturnStatement, Diagnostics.Surmise_all_return_value); |
| 201 | + return createCodeFixAction(fixId, changes, Diagnostics.Add_a_return_statement, fixIdAddReturnStatement, Diagnostics.Correct_all_return_expressions); |
202 | 202 | }
|
203 | 203 |
|
204 | 204 | function getActionForfixRemoveBlockBodyBrace(context: CodeFixContext, declaration: ArrowFunction, expression: Expression) {
|
205 | 205 | const changes = textChanges.ChangeTracker.with(context, t => removeBlockBodyBrace(t, context.sourceFile, declaration, expression, /* withParen */ false));
|
206 |
| - return createCodeFixAction(fixId, changes, Diagnostics.Remove_block_body_braces, fixIdRemoveBlockBodyBrace, Diagnostics.Surmise_all_return_value); |
| 206 | + return createCodeFixAction(fixId, changes, Diagnostics.Remove_block_body_braces, fixIdRemoveBlockBodyBrace, Diagnostics.Correct_all_return_expressions); |
207 | 207 | }
|
208 | 208 |
|
209 | 209 | function getActionForfixReplaceBraceWithParen(context: CodeFixContext, declaration: ArrowFunction, expression: Expression) {
|
210 | 210 | const changes = textChanges.ChangeTracker.with(context, t => removeBlockBodyBrace(t, context.sourceFile, declaration, expression, /* withParen */ true));
|
211 |
| - return createCodeFixAction(fixId, changes, Diagnostics.Replace_braces_with_parentheses, fixIdReplaceBraceWithParen, Diagnostics.Surmise_all_return_value); |
| 211 | + return createCodeFixAction(fixId, changes, Diagnostics.Replace_braces_with_parentheses, fixIdReplaceBraceWithParen, Diagnostics.Correct_all_return_expressions); |
212 | 212 | }
|
213 | 213 |
|
214 | 214 | function getActionForfixWrapTheBlockWithParen(context: CodeFixContext, declaration: ArrowFunction, expression: Expression) {
|
215 | 215 | const changes = textChanges.ChangeTracker.with(context, t => wrapBlockWithParen(t, context.sourceFile, declaration, expression));
|
216 |
| - return createCodeFixAction(fixId, changes, Diagnostics.Wrap_this_block_with_parentheses, fixIdWrapTheBlockWithParen, Diagnostics.Surmise_all_return_value); |
| 216 | + return createCodeFixAction(fixId, changes, Diagnostics.Wrap_this_block_with_parentheses, fixIdWrapTheBlockWithParen, Diagnostics.Correct_all_return_expressions); |
217 | 217 | }
|
218 | 218 | }
|
0 commit comments