mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-17 21:09:09 -05:00
fix(53424): in code documentation is not working upon import if function expression reuse function type (#53964)
This commit is contained in:
@@ -535,12 +535,12 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ
|
||||
// don't use symbolFlags since getAliasedSymbol requires the flag on the symbol itself
|
||||
if (symbol.flags & SymbolFlags.Alias) {
|
||||
prefixNextMeaning();
|
||||
if (!hasAddedSymbolInfo) {
|
||||
if (!hasAddedSymbolInfo || documentation.length === 0 && tags.length === 0) {
|
||||
const resolvedSymbol = typeChecker.getAliasedSymbol(symbol);
|
||||
if (resolvedSymbol !== symbol && resolvedSymbol.declarations && resolvedSymbol.declarations.length > 0) {
|
||||
const resolvedNode = resolvedSymbol.declarations[0];
|
||||
const declarationName = getNameOfDeclaration(resolvedNode);
|
||||
if (declarationName) {
|
||||
if (declarationName && !hasAddedSymbolInfo) {
|
||||
const isExternalModuleDeclaration =
|
||||
isModuleWithStringLiteralName(resolvedNode) &&
|
||||
hasSyntacticModifier(resolvedNode, ModifierFlags.Ambient);
|
||||
@@ -835,7 +835,6 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ
|
||||
documentation = allSignatures[0].getDocumentationComment(typeChecker);
|
||||
tags = allSignatures[0].getJsDocTags().filter(tag => tag.name !== "deprecated"); // should only include @deprecated JSDoc tag on the first overload (#49368)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function writeTypeParametersOfSymbol(symbol: Symbol, enclosingDeclaration: Node | undefined) {
|
||||
|
||||
Reference in New Issue
Block a user