diff --git a/src/lib/converter/plugins/CommentPlugin.ts b/src/lib/converter/plugins/CommentPlugin.ts index 899611e1a..ae3a30017 100644 --- a/src/lib/converter/plugins/CommentPlugin.ts +++ b/src/lib/converter/plugins/CommentPlugin.ts @@ -386,8 +386,11 @@ export class CommentPlugin extends ConverterComponent { ); if (tag) { - parameter.comment = new Comment( - Comment.cloneDisplayParts(tag.content) + if (!parameter.comment) { + parameter.comment = new Comment(); + } + parameter.comment.summary = Comment.cloneDisplayParts( + tag.content ); } }); @@ -542,6 +545,20 @@ function moveNestedParamTags(comment: Comment, parameter: ParameterReflection) { } } }, + reference() { + comment.blockTags + .filter( + (t) => + t.tag === "@param" && + t.name?.startsWith(`${parameter.name}.`) + ) + .forEach((tag) => { + if (!parameter.comment) { + parameter.comment = new Comment(); + } + parameter.comment.blockTags.push(tag); + }); + }, // #1876, also do this for unions/intersections. union(u) { u.types.forEach((t) => t.visit(visitor));