fix(55939): JS Doc comment not shown in signature help when overload tag exists (#56139)

This commit is contained in:
Oleksandr T
2023-10-28 01:24:07 +03:00
committed by GitHub
parent a25321afce
commit f25f2bb75d
3 changed files with 404 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ import {
isFunctionTypeNode,
isIdentifier,
isJSDoc,
isJSDocOverloadTag,
isJSDocParameterTag,
isJSDocPropertyLikeTag,
isJSDocTypeLiteral,
@@ -230,6 +231,11 @@ function getCommentHavingNodes(declaration: Declaration): readonly (JSDoc | JSDo
case SyntaxKind.JSDocCallbackTag:
case SyntaxKind.JSDocTypedefTag:
return [declaration as JSDocTypedefTag, (declaration as JSDocTypedefTag).parent];
case SyntaxKind.JSDocSignature:
if (isJSDocOverloadTag(declaration.parent)) {
return [declaration.parent.parent];
}
// falls through
default:
return getJSDocCommentsAndTags(declaration);
}