fix(55258): JSDoc render with @param Object properties (#55264)

This commit is contained in:
Oleksandr T
2023-09-20 00:00:32 +03:00
committed by GitHub
parent 1f88596bb1
commit 79736eff89
3 changed files with 210 additions and 0 deletions

View File

@@ -44,6 +44,8 @@ import {
isIdentifier,
isJSDoc,
isJSDocParameterTag,
isJSDocPropertyLikeTag,
isJSDocTypeLiteral,
isWhiteSpaceSingleLine,
JSDoc,
JSDocAugmentsTag,
@@ -250,6 +252,12 @@ export function getJsDocTagsFromDeclarations(declarations?: Declaration[], check
}
for (const tag of tags) {
infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) });
if (isJSDocPropertyLikeTag(tag) && tag.isNameFirst && tag.typeExpression && isJSDocTypeLiteral(tag.typeExpression.type)) {
forEach(tag.typeExpression.type.jsDocPropertyTags, propTag => {
infos.push({ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) });
});
}
}
});
return infos;