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 dd484df commit d1fa06eCopy full SHA for d1fa06e
tests/cases/fourslash/extract-method24.ts
@@ -0,0 +1,30 @@
1
+/// <reference path='fourslash.ts' />
2
+
3
+//// function foo() {
4
+//// type T = {};
5
+//// let x: T = /*start*/{}/*end*/;
6
+//// }
7
8
+goTo.select('start', 'end')
9
10
+verify.refactorAvailable('Extract Method');
11
12
+edit.applyRefactor('Extract Method', "scope_1");
13
14
+verify.currentFileContentIs(`function foo() {
15
+ type T = {};
16
+ let x: T = newFunction();
17
+}
18
+function newFunction(): {} {
19
+ return {};
20
21
+`);
22
23
+// Actual: "function·foo()·{↓
24
+// ····type·T·=·{};↓
25
+// ····let·x:·T·=·newFunction();↓
26
+// }¶↓
27
+// function·newFunction():·T·{¶↓
28
+// ····return·{};¶↓
29
30
+// "
0 commit comments