TypeScript/tests/cases/fourslash/extract-method-uniqueName.ts
Andy 8ad4aeece1
Make ChangeTracker#newLineCharacter public, to avoid having to pass newLineCharacter around as a parameter (#20574)
* 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
2017-12-12 12:23:13 -08:00

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;
}
`
});