Skip to content

Commit

Permalink
Accept readonly arrays on assignment
Browse files Browse the repository at this point in the history
This is safe because it's saying we expect less.
Rather than giving less on output, which could be a breaking change.
  • Loading branch information
CarsonF committed Mar 1, 2024
1 parent 18f0351 commit 3fda5b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/generate/src/syntax/casting.ts
Expand Up @@ -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;

Expand Down

0 comments on commit 3fda5b6

Please sign in to comment.