mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 09:24:19 -06:00
Don't return tags when returning quick info for JSDoc nodes (#59816)
This commit is contained in:
parent
c35b14335a
commit
58665cf3ae
@ -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);
|
||||
}
|
||||
|
||||
|
||||
9
tests/cases/fourslash/jsDocContextualTagsInJsDoc1.ts
Normal file
9
tests/cases/fourslash/jsDocContextualTagsInJsDoc1.ts
Normal 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" }]);
|
||||
Loading…
x
Reference in New Issue
Block a user