Don't return tags when returning quick info for JSDoc nodes (#59816)

This commit is contained in:
Mateusz Burzyński 2025-06-30 22:20:08 +02:00 committed by GitHub
parent c35b14335a
commit 58665cf3ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -50,6 +50,7 @@ import {
isFunctionLike,
isIdentifier,
isInExpressionContext,
isInJSDoc,
isJsxOpeningLikeElement,
isLet,
isModuleWithStringLiteralName,
@ -797,7 +798,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(
}
}
if (tags.length === 0 && !hasMultipleSignatures) {
if (tags.length === 0 && !hasMultipleSignatures && !isInJSDoc(location)) {
tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);
}

View File

@ -0,0 +1,9 @@
/// <reference path="fourslash.ts" />
//// /**
//// * @param x/*1*/ Does the thing
//// */
//// function foo(x/*2*/) {}
verify.quickInfoAt("1", "(parameter) x: any", "Does the thing", undefined);
verify.quickInfoAt("2", "(parameter) x: any", "Does the thing", [{ name: "param", text: "x Does the thing" }]);