File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,8 @@ namespace ts.JsDoc {
363363 // want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'.
364364 return commentOwner . parent . kind === SyntaxKind . ModuleDeclaration ? undefined : { commentOwner } ;
365365
366+ case SyntaxKind . ExpressionStatement :
367+ return getCommentOwnerInfoWorker ( ( commentOwner as ExpressionStatement ) . expression ) ;
366368 case SyntaxKind . BinaryExpression : {
367369 const be = commentOwner as BinaryExpression ;
368370 if ( getAssignmentDeclarationKind ( be ) === AssignmentDeclarationKind . None ) {
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ // @allowJs : true
4+ // @checkJs : true
5+
6+ // @Filename : index.js
7+ //// /** /**/ */
8+ //// exports.foo = (a) => {};
9+
10+
11+ verify . docCommentTemplateAt ( "" , 8 ,
12+ `/**
13+ *
14+ * @param {any} a
15+ */` ) ;
You can’t perform that action at this time.
0 commit comments