Skip to content

Commit dd484df

Browse files
committed
Merge branch 'extract-method' of https://github.com/RyanCavanaugh/TypeScript into breakextractmethod
2 parents bd88cca + 37ae957 commit dd484df

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
// New function names should be totally new to the file
4+
5+
//// function fn() {
6+
//// /*a*/console.log("hi");/*b*/
7+
//// }
8+
////
9+
//// function newFunction() { }
10+
11+
goTo.select('a', 'b')
12+
verify.refactorAvailable('Extract Method');
13+
edit.applyRefactor('Extract Method', "scope_0");
14+
verify.currentFileContentIs(`function fn() {
15+
newFunction_1();
16+
17+
function newFunction_1() {
18+
console.log("hi");
19+
}
20+
}
21+
22+
function newFunction() { }`);

0 commit comments

Comments
 (0)