fix(51716): find all references in imported JSDoc types (#51729)

This commit is contained in:
Oleksandr T
2022-12-20 23:16:17 +02:00
committed by GitHub
parent cf68a12d69
commit 6f4d340458
3 changed files with 140 additions and 1 deletions

View File

@@ -44,6 +44,7 @@ import {
isImportEqualsDeclaration,
isImportTypeNode,
isInJSFile,
isJSDocCallbackTag,
isJSDocTypedefTag,
isModuleExportsAccessExpression,
isNamedExports,
@@ -612,7 +613,7 @@ export function getImportOrExportSymbol(node: Node, symbol: Symbol, checker: Typ
else if (isBinaryExpression(grandparent)) {
return getSpecialPropertyExport(grandparent, /*useLhsSymbol*/ true);
}
else if (isJSDocTypedefTag(parent)) {
else if (isJSDocTypedefTag(parent) || isJSDocCallbackTag(parent)) {
return exportInfo(symbol, ExportKind.Named);
}
}