Merge pull request #34496 from microsoft/fix34272

Properly attach alias symbol to `readonly T[]` types
This commit is contained in:
Anders Hejlsberg
2019-10-18 12:07:03 -07:00
committed by GitHub
4 changed files with 8 additions and 8 deletions

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;