File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -353,7 +353,8 @@ namespace ts.JsDoc {
353353 }
354354
355355 const { commentOwner, parameters, hasReturn } = commentOwnerInfo ;
356- if ( commentOwner . getStart ( sourceFile ) < position ) {
356+ const commentOwnerJSDoc = hasJSDocNodes ( commentOwner ) && commentOwner . jsDoc ? lastOrUndefined ( commentOwner . jsDoc ) : undefined ;
357+ if ( commentOwner . getStart ( sourceFile ) < position || commentOwnerJSDoc && commentOwnerJSDoc !== existingDocComment ) {
357358 return undefined ;
358359 }
359360
Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts' />
2+
3+ /////** /**/ */
4+ ////
5+ /////**
6+ //// * @param {string } a
7+ //// * @param {string } b
8+ //// */
9+ ////function foo(a, b) {
10+ //// return a + b;
11+ //// }
12+
13+ verify . noDocCommentTemplateAt ( "" ) ;
You can’t perform that action at this time.
0 commit comments