Stop offering to convert single string literals to template expressions.

This commit is contained in:
Daniel Rosenwasser
2020-02-13 11:52:25 -08:00
parent 206d39e9b5
commit 11e827ba84
@@ -11,7 +11,7 @@ namespace ts.refactor.convertStringOrTemplateLiteral {
const maybeBinary = getParentBinaryExpression(node);
const refactorInfo: ApplicableRefactorInfo = { name: refactorName, description: refactorDescription, actions: [] };
if ((isBinaryExpression(maybeBinary) || isStringLiteral(maybeBinary)) && isStringConcatenationValid(maybeBinary)) {
if (isBinaryExpression(maybeBinary) && isStringConcatenationValid(maybeBinary)) {
refactorInfo.actions.push({ name: refactorName, description: refactorDescription });
return [refactorInfo];
}