mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix import type resolution in jsdoc, mark 2 (#35057)
Fake alias resolution only applies when the import type is followed by a qualified name. Otherwise the alias is sufficiently resolved already.
This commit is contained in:
@@ -10818,7 +10818,8 @@ namespace ts {
|
||||
isRequireAlias = isCallExpression(expr) && isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol;
|
||||
}
|
||||
const isDelayedMergeClass = symbol !== valueType.symbol && getMergedSymbol(symbol) === valueType.symbol;
|
||||
if (isRequireAlias || node.kind === SyntaxKind.ImportType || isDelayedMergeClass) {
|
||||
const isImportTypeWithQualifier = node.kind === SyntaxKind.ImportType && (node as ImportTypeNode).qualifier;
|
||||
if (isRequireAlias || isImportTypeWithQualifier || isDelayedMergeClass) {
|
||||
typeType = getTypeReferenceType(node, valueType.symbol);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user