mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-02 14:48:32 -05:00
Merge pull request #10995 from Microsoft/js_doc_comment_no_tags
Handle msising tags for JsDoc nodes
This commit is contained in:
@@ -1604,7 +1604,7 @@ namespace ts {
|
||||
|
||||
// @kind(SyntaxKind.JSDocComment)
|
||||
export interface JSDoc extends Node {
|
||||
tags: NodeArray<JSDocTag>;
|
||||
tags: NodeArray<JSDocTag> | undefined;
|
||||
comment: string | undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -218,15 +218,13 @@ namespace ts.NavigationBar {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (node.jsDocComments) {
|
||||
for (const jsDocComment of node.jsDocComments) {
|
||||
for (const tag of jsDocComment.tags) {
|
||||
if (tag.kind === SyntaxKind.JSDocTypedefTag) {
|
||||
addLeafNode(tag);
|
||||
}
|
||||
forEach(node.jsDocComments, jsDocComment => {
|
||||
forEach(jsDocComment.tags, tag => {
|
||||
if (tag.kind === SyntaxKind.JSDocTypedefTag) {
|
||||
addLeafNode(tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
forEachChild(node, addChildrenRecursively);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user