File tree 3 files changed +25
-9
lines changed 3 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -1604,7 +1604,7 @@ namespace ts {
1604
1604
1605
1605
// @kind (SyntaxKind.JSDocComment)
1606
1606
export interface JSDoc extends Node {
1607
- tags : NodeArray < JSDocTag > ;
1607
+ tags : NodeArray < JSDocTag > | undefined ;
1608
1608
comment : string | undefined ;
1609
1609
}
1610
1610
Original file line number Diff line number Diff line change @@ -218,15 +218,13 @@ namespace ts.NavigationBar {
218
218
break ;
219
219
220
220
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 ) ;
227
225
}
228
- }
229
- }
226
+ } ) ;
227
+ } ) ;
230
228
231
229
forEachChild ( node , addChildrenRecursively ) ;
232
230
}
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