diff --git a/packages/generate/src/syntax/casting.ts b/packages/generate/src/syntax/casting.ts index a29e167e3..2fa59cdfd 100644 --- a/packages/generate/src/syntax/casting.ts +++ b/packages/generate/src/syntax/casting.ts @@ -113,11 +113,11 @@ type getAssignmentLiteral< ? | TsType | (Set["__cardinality__"] extends Cardinality.Many - ? TsType[] + ? readonly TsType[] : Set["__cardinality__"] extends Cardinality.AtLeastOne ? IsSetModifier extends true - ? TsType[] - : [TsType, ...TsType[]] + ? readonly TsType[] + : readonly [TsType, ...TsType[]] : never) : never;