File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1604,7 +1604,7 @@ namespace ts {
16041604
16051605 // @kind (SyntaxKind.JSDocComment)
16061606 export interface JSDoc extends Node {
1607- tags : NodeArray < JSDocTag > ;
1607+ tags : NodeArray < JSDocTag > | undefined ;
16081608 comment : string | undefined ;
16091609 }
16101610
Original file line number Diff line number Diff line change @@ -218,15 +218,13 @@ namespace ts.NavigationBar {
218218 break ;
219219
220220 default :
221- if ( node . jsDocComments ) {
222- for ( const jsDocComment of node . jsDocComments ) {
223- for ( const tag of jsDocComment . tags ) {
224- if ( tag . kind === SyntaxKind . JSDocTypedefTag ) {
225- addLeafNode ( tag ) ;
226- }
221+ forEach ( node . jsDocComments , jsDocComment => {
222+ forEach ( jsDocComment . tags , tag => {
223+ if ( tag . kind === SyntaxKind . JSDocTypedefTag ) {
224+ addLeafNode ( tag ) ;
227225 }
228- }
229- }
226+ } ) ;
227+ } ) ;
230228
231229 forEachChild ( node , addChildrenRecursively ) ;
232230 }
Original file line number Diff line number Diff line change 1+ /// <reference path="fourslash.ts"/>
2+
3+ /////** Test */
4+ ////export const Test = {}
5+
6+ verify . navigationBar ( [
7+ {
8+ "text" : "\"navigationBarJsDocCommentWithNoTags\"" ,
9+ "kind" : "module" ,
10+ "childItems" : [
11+ {
12+ "text" : "Test" ,
13+ "kind" : "const" ,
14+ "kindModifiers" : "export"
15+ }
16+ ]
17+ }
18+ ] ) ;
You can’t perform that action at this time.
0 commit comments