extractMethod: Support renameLocation (#18050)

* extractMethod: Support renameLocation

* Add tslint disable

* Properly analyze list of changes to always get a correct rename location

* Update test

* Ensure name is really unique

* Improvements to test code

* Respond to PR comments
This commit is contained in:
Andy
2017-09-13 09:02:10 -07:00
committed by GitHub
parent f2c81cc4f4
commit c3199c7772
50 changed files with 431 additions and 338 deletions

View File

@@ -586,9 +586,7 @@ namespace ts.server {
const response = this.processResponse<protocol.GetEditsForRefactorResponse>(request);
if (!response.body) {
return {
edits: []
};
return { edits: [], renameFilename: undefined, renameLocation: undefined };
}
const edits: FileTextChanges[] = this.convertCodeEditsToTextChanges(response.body.edits);