Major changes: 1) Instead of skipping undesirable scopes, include them and mark them with errors. Constants can be extracted into more scopes. 2) Update the tests to call through the "public" API. This caused some baseline changes. 3) Rename refactoring to "Extract Symbol" for generality. 4) Return a second ApplicableRefactorInfo for constants. Distinguish the two by splitting the action name.
11 lines
214 B
TypeScript
11 lines
214 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
//// function f() {
|
|
//// /*a*/function q() { }
|
|
//// q();/*b*/
|
|
//// q();
|
|
//// }
|
|
|
|
goTo.select('a', 'b');
|
|
verify.not.refactorAvailable("Extract Symbol");
|
|
|