From cbcb59c95c9baf10a64cc69e9c0fba85b65d9e4f Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 15 Oct 2019 11:11:14 -0700 Subject: [PATCH] Properly attach alias symbol to `readonly T[]` types --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 78f8b965ca1..4df420185ec 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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;