File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,10 +266,12 @@ namespace ts.JsDoc {
266266 case SyntaxKind . FunctionDeclaration :
267267 case SyntaxKind . MethodDeclaration :
268268 case SyntaxKind . Constructor :
269- const { parameters } = commentOwner as FunctionDeclaration | MethodDeclaration | ConstructorDeclaration ;
269+ case SyntaxKind . MethodSignature :
270+ const { parameters } = commentOwner as FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | MethodSignature ;
270271 return { commentOwner, parameters } ;
271272
272273 case SyntaxKind . ClassDeclaration :
274+ case SyntaxKind . InterfaceDeclaration :
273275 return { commentOwner } ;
274276
275277 case SyntaxKind . VariableStatement : {
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ /////*interfaceFoo*/
4+ ////interface Foo {
5+ //// /*propertybar*/
6+ //// bar: any;
7+ ////
8+ //// /*methodbaz*/
9+ //// baz(message: any): void;
10+ //// }
11+
12+ verify . docCommentTemplateAt ( "interfaceFoo" , /*expectedOffset*/ 8 ,
13+ `/**
14+ *
15+ */` ) ;
16+
17+ verify . emptyDocCommentTemplateAt ( "propertybar" ) ;
18+
19+ verify . docCommentTemplateAt ( "methodbaz" , /*expectedOffset*/ 12 ,
20+ `/**
21+ *
22+ * @param message
23+ */` ) ;
You can’t perform that action at this time.
0 commit comments