2019-03-28 15:05:22 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
//// const foo = /* C0 */ /*x*/"/*y*/foo" + /* C1 */ " is" + /* C2 */ 42 + /* C3 */ " and bar" + /* C4 */ " is" + /* C5 */ 52/* C6 */
|
|
|
|
|
|
|
|
goTo.select("x", "y");
|
|
|
|
edit.applyRefactor({
|
2020-01-03 01:32:06 +01:00
|
|
|
refactorName: "Convert to template string",
|
|
|
|
actionName: "Convert to template string",
|
|
|
|
actionDescription: ts.Diagnostics.Convert_to_template_string.message,
|
2019-03-28 15:05:22 +01:00
|
|
|
newContent:
|
|
|
|
"const foo = /* C0 */ `foo is\${ /* C1 */ /* C2 */42 /* C3 */} and bar is\${ /* C4 */ /* C5 */52 /* C6 */}`",
|
|
|
|
});
|