Do not erase signatures in getSignatureOfTypeTag (#43688)

I don't see a reason for it, and it doesn't cause any tests to fail.
This commit is contained in:
Nathan Shively-Sanders
2021-04-15 10:53:23 -07:00
committed by GitHub
parent 931b20af6c
commit 0987ee9e0e
6 changed files with 84 additions and 2 deletions

View File

@@ -12207,8 +12207,7 @@ namespace ts {
// should be attached to a function declaration or expression
if (!(isInJSFile(node) && isFunctionLikeDeclaration(node))) return undefined;
const typeTag = getJSDocTypeTag(node);
const signature = typeTag && typeTag.typeExpression && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));
return signature && getErasedSignature(signature);
return typeTag?.typeExpression && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));
}
function getReturnTypeOfTypeTag(node: SignatureDeclaration | JSDocSignature) {