Properly attach alias symbol to readonly T[] types

This commit is contained in:
Anders Hejlsberg 2019-10-15 11:11:14 -07:00
parent c9d407b52a
commit cbcb59c95c

View file

@ -12438,7 +12438,7 @@ namespace ts {
function getAliasSymbolForTypeNode(node: TypeNode) {
let host = node.parent;
while (isParenthesizedTypeNode(host)) {
while (isParenthesizedTypeNode(host) || isTypeOperatorNode(host) && host.operator === SyntaxKind.ReadonlyKeyword) {
host = host.parent;
}
return isTypeAlias(host) ? getSymbolOfNode(host) : undefined;