Skip to content

Commit ff42c3d

Browse files
committed
Handle readonly arrays and tuples in decorator metadata serialization
1 parent 151fac9 commit ff42c3d

File tree

1 file changed

+6
-0
lines changed
  • src/compiler/transformers

1 file changed

+6
-0
lines changed

src/compiler/transformers/ts.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,12 @@ namespace ts {
19341934
case SyntaxKind.ConditionalType:
19351935
return serializeTypeList([(<ConditionalTypeNode>node).trueType, (<ConditionalTypeNode>node).falseType]);
19361936

1937+
case SyntaxKind.TypeOperator:
1938+
if ((<TypeOperatorNode>node).operator === SyntaxKind.ReadonlyKeyword) {
1939+
return serializeTypeNode((<TypeOperatorNode>node).type);
1940+
}
1941+
break;
1942+
19371943
case SyntaxKind.TypeQuery:
19381944
case SyntaxKind.TypeOperator:
19391945
case SyntaxKind.IndexedAccessType:

0 commit comments

Comments
 (0)