mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
fix(55258): JSDoc render with @param Object properties (#55264)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user