Don't add duplicates of JSDoc comments.
This commit is contained in:
parent
1450908e5c
commit
74d6d04d70
|
@ -93,10 +93,13 @@ namespace ts.JsDoc {
|
|||
forEachUnique(declarations, declaration => {
|
||||
for (const { comment } of getCommentHavingNodes(declaration)) {
|
||||
if (comment === undefined) continue;
|
||||
if (documentationComment.length) {
|
||||
documentationComment.push(lineBreakPart());
|
||||
const commentTextPart = textPart(comment);
|
||||
if (!contains(documentationComment, commentTextPart)) {
|
||||
if (documentationComment.length) {
|
||||
documentationComment.push(lineBreakPart());
|
||||
}
|
||||
documentationComment.push(commentTextPart);
|
||||
}
|
||||
documentationComment.push(textPart(comment));
|
||||
}
|
||||
});
|
||||
return documentationComment;
|
||||
|
|
Loading…
Reference in a new issue