8ad4aeece1
* Make ChangeTracker#newLineCharacter public, to avoid having to pass newLineCharacter around as a parameter * Don't require newLineCharacter as input to ChangeTracker methods, and make it private again
19 lines
375 B
TypeScript
19 lines
375 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
////// newFunction
|
|
/////*start*/1 + 1/*end*/;
|
|
|
|
goTo.select('start', 'end')
|
|
edit.applyRefactor({
|
|
refactorName: "Extract Symbol",
|
|
actionName: "function_scope_0",
|
|
actionDescription: "Extract to function in global scope",
|
|
newContent:
|
|
`// newFunction
|
|
/*RENAME*/newFunction_1();
|
|
|
|
function newFunction_1() {
|
|
1 + 1;
|
|
}
|
|
`
|
|
});
|