@@ -62,38 +62,32 @@ type _BooleanSchema = util.Satisfies<{ type: 'boolean' }, JSONSchema7>
6262type _NullSchema = util . Satisfies < { type : 'null' } , JSONSchema7 >
6363type _UndefinedSchema = util . Satisfies < { not : true } , JSONSchema7 >
6464type _NeverSchema = util . Satisfies < { not : true } , JSONSchema7 >
65- type _ArraySchema = util . Satisfies <
66- { type : 'array' ; items : ZuiJSONSchema ; minItems ?: number ; maxItems ?: number } ,
67- JSONSchema7
68- >
69- type _UnionSchema = util . Satisfies < { anyOf : ZuiJSONSchema [ ] } , JSONSchema7 >
70- type _DiscriminatedUnionSchema = util . Satisfies < { anyOf : ZuiJSONSchema [ ] } , JSONSchema7 >
71- type _IntersectionSchema = util . Satisfies < { allOf : ZuiJSONSchema [ ] } , JSONSchema7 >
65+ type _ArraySchema = util . Satisfies < { type : 'array' ; items : Schema ; minItems ?: number ; maxItems ?: number } , JSONSchema7 >
66+ type _UnionSchema = util . Satisfies < { anyOf : Schema [ ] } , JSONSchema7 >
67+ type _DiscriminatedUnionSchema = util . Satisfies < { anyOf : Schema [ ] } , JSONSchema7 >
68+ type _IntersectionSchema = util . Satisfies < { allOf : Schema [ ] } , JSONSchema7 >
7269type _SetSchema = util . Satisfies <
73- { type : 'array' ; items : ZuiJSONSchema ; uniqueItems : true ; minItems ?: number ; maxItems ?: number } ,
70+ { type : 'array' ; items : Schema ; uniqueItems : true ; minItems ?: number ; maxItems ?: number } ,
7471 JSONSchema7
7572>
7673type _EnumSchema = util . Satisfies < { type : 'string' ; enum : string [ ] } , JSONSchema7 >
7774type _RefSchema = util . Satisfies < { $ref : string } , JSONSchema7 >
7875type _ObjectSchema = util . Satisfies <
7976 {
8077 type : 'object'
81- properties : { [ key : string ] : ZuiJSONSchema }
82- additionalProperties ?: ZuiJSONSchema | boolean
78+ properties : { [ key : string ] : Schema }
79+ additionalProperties ?: Schema | boolean
8380 required ?: string [ ]
8481 } ,
8582 JSONSchema7
8683>
87- type _TupleSchema = util . Satisfies <
88- { type : 'array' ; items : ZuiJSONSchema [ ] ; additionalItems ?: ZuiJSONSchema } ,
89- JSONSchema7
90- >
91- type _RecordSchema = util . Satisfies < { type : 'object' ; additionalProperties : ZuiJSONSchema } , JSONSchema7 >
84+ type _TupleSchema = util . Satisfies < { type : 'array' ; items : Schema [ ] ; additionalItems ?: Schema } , JSONSchema7 >
85+ type _RecordSchema = util . Satisfies < { type : 'object' ; additionalProperties : Schema } , JSONSchema7 >
9286type _LiteralStringSchema = util . Satisfies < { type : 'string' ; const : string } , JSONSchema7 >
9387type _LiteralNumberSchema = util . Satisfies < { type : 'number' ; const : number } , JSONSchema7 >
9488type _LiteralBooleanSchema = util . Satisfies < { type : 'boolean' ; const : boolean } , JSONSchema7 >
95- type _OptionalSchema = util . Satisfies < { anyOf : [ ZuiJSONSchema , UndefinedSchema ] } , JSONSchema7 >
96- type _NullableSchema = util . Satisfies < { anyOf : [ ZuiJSONSchema , NullSchema ] } , JSONSchema7 >
89+ type _OptionalSchema = util . Satisfies < { anyOf : [ Schema , UndefinedSchema ] } , JSONSchema7 >
90+ type _NullableSchema = util . Satisfies < { anyOf : [ Schema , NullSchema ] } , JSONSchema7 >
9791
9892export type StringSchema = _StringSchema & BaseZuiJSONSchema
9993export type NumberSchema = _NumberSchema & BaseZuiJSONSchema
@@ -118,10 +112,12 @@ export type LiteralNumberSchema = _LiteralNumberSchema & BaseZuiJSONSchema
118112export type LiteralBooleanSchema = _LiteralBooleanSchema & BaseZuiJSONSchema
119113export type OptionalSchema = _OptionalSchema & BaseZuiJSONSchema < OptionalDef >
120114export type NullableSchema = _NullableSchema & BaseZuiJSONSchema < NullableDef >
121-
122115export type LiteralSchema = LiteralStringSchema | LiteralNumberSchema | LiteralBooleanSchema
123116
124- export type ZuiJSONSchema =
117+ /**
118+ * Zui flavored JSON Schema; a subset of JSONSchema7 that includes Zui extensions
119+ */
120+ export type Schema =
125121 | StringSchema
126122 | NumberSchema
127123 | BooleanSchema
0 commit comments