mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Stop requiring that the full range of a declaration fall within the
selection Fixes #18546
This commit is contained in:
@@ -1209,7 +1209,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