File tree 2 files changed +58
-1
lines changed
2 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 237
237
"scope" : " inner" ,
238
238
"memberof" : " module:test"
239
239
},
240
+ {
241
+ "comment" : " /** @ignore */" ,
242
+ "meta" : {
243
+ "range" : [
244
+ 434 ,
245
+ 465
246
+ ],
247
+ "filename" : " LeadingComments.js" ,
248
+ "lineno" : 14 ,
249
+ "columnno" : 0 ,
250
+ "code" : {
251
+ "name" : " exports.LeadingComments" ,
252
+ "type" : " ClassDeclaration"
253
+ }
254
+ },
255
+ "ignore" : true ,
256
+ "name" : " LeadingComments" ,
257
+ "longname" : " LeadingComments" ,
258
+ "kind" : " class" ,
259
+ "scope" : " global"
260
+ },
261
+ {
262
+ "comment" : " /**\n * Doclet\n */" ,
263
+ "meta" : {
264
+ "range" : [
265
+ 441 ,
266
+ 465
267
+ ],
268
+ "filename" : " LeadingComments.js" ,
269
+ "lineno" : 14 ,
270
+ "columnno" : 7 ,
271
+ "code" : {
272
+ "name" : " LeadingComments" ,
273
+ "type" : " ClassDeclaration" ,
274
+ "paramnames" : []
275
+ }
276
+ },
277
+ "classdesc" : " Doclet" ,
278
+ "name" : " LeadingComments" ,
279
+ "longname" : " LeadingComments" ,
280
+ "kind" : " class" ,
281
+ "scope" : " global"
282
+ },
240
283
{
241
284
"comment" : " /**\n * @module test/sub/NumberStore\n */" ,
242
285
"meta" : {
465
508
"longname" : " module:test/sub/NumberStore" ,
466
509
"kind" : " member"
467
510
}
468
- ]
511
+ ]
Original file line number Diff line number Diff line change
1
+ // Import statement required for JSDoc to include first comment as leading comment of the class.
2
+ // Otherwise, it gets moved in the AST to the `Program` node from the `ExportNamedDeclaration` class node:
3
+ // https://github.com/jsdoc/jsdoc/blob/main/packages/jsdoc-ast/lib/walker.js#L465
4
+ // This itself may be a bug, as it seems to be intended for @module comments.
5
+ import '' ; // eslint-disable-line
6
+
7
+ /*
8
+ Comment
9
+ */
10
+
11
+ /**
12
+ * Doclet
13
+ */
14
+ export class LeadingComments { }
You can’t perform that action at this time.
0 commit comments