@@ -108,25 +108,25 @@ type UncheckedJSONSchemaType<T, IsPartial extends boolean> = (
108
108
: UncheckedPropertiesSchema < T >
109
109
patternProperties ?: Record < string , UncheckedJSONSchemaType < T [ string ] , false > >
110
110
propertyNames ?: Omit < UncheckedJSONSchemaType < string , false > , "type" > & { type ?: "string" }
111
- dependencies ?: { [ K in keyof T ] ?: Readonly < ( keyof T ) [ ] > | UncheckedPartialSchema < T > }
112
- dependentRequired ?: { [ K in keyof T ] ?: Readonly < ( keyof T ) [ ] > }
111
+ dependencies ?: { [ K in keyof T ] ?: readonly ( keyof T ) [ ] | UncheckedPartialSchema < T > }
112
+ dependentRequired ?: { [ K in keyof T ] ?: readonly ( keyof T ) [ ] }
113
113
dependentSchemas ?: { [ K in keyof T ] ?: UncheckedPartialSchema < T > }
114
114
minProperties ?: number
115
115
maxProperties ?: number
116
116
} & ( IsPartial extends true // "required" is not necessary if it's a non-partial type with no required keys // are listed it only asserts that optional cannot be listed. // "required" type does not guarantee that all required properties
117
- ? { required : Readonly < ( keyof T ) [ ] > }
117
+ ? { required : readonly ( keyof T ) [ ] }
118
118
: [ UncheckedRequiredMembers < T > ] extends [ never ]
119
- ? { required ?: Readonly < UncheckedRequiredMembers < T > [ ] > }
120
- : { required : Readonly < UncheckedRequiredMembers < T > [ ] > } )
119
+ ? { required ?: readonly UncheckedRequiredMembers < T > [ ] }
120
+ : { required : readonly UncheckedRequiredMembers < T > [ ] } )
121
121
: T extends null
122
122
? {
123
123
type : JSONType < "null" , IsPartial >
124
124
nullable : true
125
125
}
126
126
: never ) & {
127
- allOf ?: Readonly < UncheckedPartialSchema < T > [ ] >
128
- anyOf ?: Readonly < UncheckedPartialSchema < T > [ ] >
129
- oneOf ?: Readonly < UncheckedPartialSchema < T > [ ] >
127
+ allOf ?: readonly UncheckedPartialSchema < T > [ ]
128
+ anyOf ?: readonly UncheckedPartialSchema < T > [ ]
129
+ oneOf ?: readonly UncheckedPartialSchema < T > [ ]
130
130
if ?: UncheckedPartialSchema < T >
131
131
then ?: UncheckedPartialSchema < T >
132
132
else ?: UncheckedPartialSchema < T >
@@ -176,12 +176,12 @@ type Nullable<T> = undefined extends T
176
176
? {
177
177
nullable : true
178
178
const ?: null // any non-null value would fail `const: null`, `null` would fail any other value in const
179
- enum ?: Readonly < ( T | null ) [ ] > // `null` must be explicitly included in "enum" for `null` to pass
179
+ enum ?: readonly ( T | null ) [ ] // `null` must be explicitly included in "enum" for `null` to pass
180
180
default ?: T | null
181
181
}
182
182
: {
183
183
nullable ?: false
184
184
const ?: T
185
- enum ?: Readonly < T [ ] >
185
+ enum ?: readonly T [ ]
186
186
default ?: T
187
187
}
0 commit comments