Skip to content

Commit

Permalink
Merge pull request #1448 from LinusU/patch-1
Browse files Browse the repository at this point in the history
fix: allow readonly arrays in interfaces
  • Loading branch information
epoberezkin committed Feb 16, 2021
2 parents 6926312 + 3468e93 commit e63771c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/types/json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export type JSONSchemaType<T, _partial extends boolean = false> = (T extends num
} & {length: T["length"]}
minItems: T["length"]
} & ({maxItems: T["length"]} | {additionalItems: false})
: T extends any[]
: T extends readonly any[]
? {
type: JSONType<"array", _partial>
items: JSONSchemaType<T[0]>
Expand Down

0 comments on commit e63771c

Please sign in to comment.