fix(50077): skip convertOverloadListToSingleSignature refactoring if position is in function body (#50093)

This commit is contained in:
Oleksandr T authored and GitHub committed 2022-08-03 13:56:42 -07:00
1 parent a3a5e009a5
commit 59c91f6ce9
2 files changed
+26

No files matched your search

@@ -185,6 +185,10 @@ ${newComment.split("\n").map(c => ` * ${c}`).join("\n")}
if (!containingDecl) {
return;
}
if (isFunctionLikeDeclaration(containingDecl) && containingDecl.body && rangeContainsPosition(containingDecl.body, startPosition)) {
return;
}
const checker = program.getTypeChecker();
const signatureSymbol = containingDecl.symbol;
if (!signatureSymbol) {