mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Fix recursive types in @typedef (#40861)
* Fix reference types in @typedef Previously this code path was broken and untested. Fortunately the fix is simple. * add test case from #40234 * update baselines
This commit is contained in:
committed by
GitHub
parent
0ba250dc3b
commit
b8ebad48d7
@@ -14398,7 +14398,7 @@ namespace ts {
|
||||
|
||||
function getAliasSymbolForTypeNode(node: Node) {
|
||||
let host = node.parent;
|
||||
while (isParenthesizedTypeNode(host) || isTypeOperatorNode(host) && host.operator === SyntaxKind.ReadonlyKeyword) {
|
||||
while (isParenthesizedTypeNode(host) || isJSDocTypeExpression(host) || isTypeOperatorNode(host) && host.operator === SyntaxKind.ReadonlyKeyword) {
|
||||
host = host.parent;
|
||||
}
|
||||
return isTypeAlias(host) ? getSymbolOfNode(host) : undefined;
|
||||
|
||||
Reference in New Issue
Block a user