mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
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:
committed by
GitHub
parent
931b20af6c
commit
0987ee9e0e
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user