mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Merge pull request #18563 from amcasey/GH18546
Stop requiring that the full range of a declaration fall within the selection
This commit is contained in:
@@ -1205,7 +1205,7 @@ namespace ts.refactor.extractMethod {
|
||||
if (!declInFile) {
|
||||
return undefined;
|
||||
}
|
||||
if (rangeContainsRange(enclosingTextRange, declInFile)) {
|
||||
if (rangeContainsStartEnd(enclosingTextRange, declInFile.getStart(), declInFile.end)) {
|
||||
// declaration is located in range to be extracted - do nothing
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user