We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c0f0d2 commit 1e9f42fCopy full SHA for 1e9f42f
tests/cases/fourslash/refactorExtractType71.ts
@@ -0,0 +1,17 @@
1
+/// <reference path='fourslash.ts' />
2
+
3
+////const key = "key";
4
+////type Foo = /*a*/`${typeof key}Foo`/*b*/;
5
6
+goTo.select("a", "b");
7
+edit.applyRefactor({
8
+ refactorName: "Extract type",
9
+ actionName: "Extract to type alias",
10
+ actionDescription: "Extract to type alias",
11
+ newContent: [
12
+ "const key = \"key\";",
13
+ "type /*RENAME*/NewType = `${typeof key}Foo`;",
14
+ "",
15
+ "type Foo = NewType;"
16
+ ].join("\n"),
17
+});
0 commit comments