mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
add diagnostic messages
This commit is contained in:
@@ -4930,5 +4930,17 @@
|
||||
"Convert parameters to destructured object": {
|
||||
"category": "Message",
|
||||
"code": 95075
|
||||
},
|
||||
"Convert string concatenation or template literal": {
|
||||
"category": "Message",
|
||||
"code": 95076
|
||||
},
|
||||
"Convert to template literal": {
|
||||
"category": "Message",
|
||||
"code": 95077
|
||||
},
|
||||
"Convert to string concatenation": {
|
||||
"category": "Message",
|
||||
"code": 95078
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* @internal */
|
||||
namespace ts.refactor.convertStringOrTemplateLiteral {
|
||||
const refactorName = "Convert string concatenation or template literal";
|
||||
const refactorDescription = "Convert string concatenation or template literal";
|
||||
const toTemplateLiteralActionName = "Convert to template literal";
|
||||
const toStringConcatenationActionName = "Convert to string concatenation";
|
||||
const toTemplateLiteralDescription = "Convert to template literal";
|
||||
const toStringConcatenationDescription = "Convert to string concatenation";
|
||||
// const toTemplateLiteralActionName = "Convert to template literal";
|
||||
// const toStringConcatenationActionName = "Convert to string concatenation";
|
||||
|
||||
// const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_string_concatenation_or_template_literal);
|
||||
// const toTemplateLiteralDescription = getLocaleSpecificMessage(Diagnostics.Convert_to_template_literal);
|
||||
// const toStringConcatenationDescription = getLocaleSpecificMessage(Diagnostics.Convert_to_string_concatenation);
|
||||
|
||||
// TODO convert Description to DiagnosticMsg
|
||||
registerRefactor(refactorName, { getEditsForAction, getAvailableActions });
|
||||
|
||||
function getAvailableActions(context: RefactorContext): ReadonlyArray<ApplicableRefactorInfo> {
|
||||
@@ -17,7 +17,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
|
||||
}
|
||||
|
||||
function getEditsForAction(context: RefactorContext, actionName: string): RefactorEditInfo | undefined {
|
||||
const { file, startPosition } = context; file; startPosition;
|
||||
const { file, startPosition } = context; file; startPosition; actionName;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user