Skip to content

Commit cbcb59c

Browse files
committed
Properly attach alias symbol to readonly T[] types
1 parent c9d407b commit cbcb59c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12438,7 +12438,7 @@ namespace ts {
1243812438

1243912439
function getAliasSymbolForTypeNode(node: TypeNode) {
1244012440
let host = node.parent;
12441-
while (isParenthesizedTypeNode(host)) {
12441+
while (isParenthesizedTypeNode(host) || isTypeOperatorNode(host) && host.operator === SyntaxKind.ReadonlyKeyword) {
1244212442
host = host.parent;
1244312443
}
1244412444
return isTypeAlias(host) ? getSymbolOfNode(host) : undefined;

0 commit comments

Comments
 (0)