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 => {
|
forEachUnique(declarations, declaration => {
|
||||||
for (const { comment } of getCommentHavingNodes(declaration)) {
|
for (const { comment } of getCommentHavingNodes(declaration)) {
|
||||||
if (comment === undefined) continue;
|
if (comment === undefined) continue;
|
||||||
if (documentationComment.length) {
|
const commentTextPart = textPart(comment);
|
||||||
documentationComment.push(lineBreakPart());
|
if (!contains(documentationComment, commentTextPart)) {
|
||||||
|
if (documentationComment.length) {
|
||||||
|
documentationComment.push(lineBreakPart());
|
||||||
|
}
|
||||||
|
documentationComment.push(commentTextPart);
|
||||||
}
|
}
|
||||||
documentationComment.push(textPart(comment));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return documentationComment;
|
return documentationComment;
|
||||||
|
|
Loading…
Reference in a new issue