Skip to content

Commit 58665cf

Browse files
authored
Don't return tags when returning quick info for JSDoc nodes (#59816)
1 parent c35b143 commit 58665cf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/services/symbolDisplay.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import {
5050
isFunctionLike,
5151
isIdentifier,
5252
isInExpressionContext,
53+
isInJSDoc,
5354
isJsxOpeningLikeElement,
5455
isLet,
5556
isModuleWithStringLiteralName,
@@ -797,7 +798,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(
797798
}
798799
}
799800

800-
if (tags.length === 0 && !hasMultipleSignatures) {
801+
if (tags.length === 0 && !hasMultipleSignatures && !isInJSDoc(location)) {
801802
tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);
802803
}
803804

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
//// /**
4+
//// * @param x/*1*/ Does the thing
5+
//// */
6+
//// function foo(x/*2*/) {}
7+
8+
verify.quickInfoAt("1", "(parameter) x: any", "Does the thing", undefined);
9+
verify.quickInfoAt("2", "(parameter) x: any", "Does the thing", [{ name: "param", text: "x Does the thing" }]);

0 commit comments

Comments
 (0)