@@ -986,7 +986,7 @@ export function partialRecord<Key extends core.$ZodRecordKey, Value extends Some
986986 keyType : union ( [ keyType , never ( ) ] ) ,
987987 valueType,
988988 ...util . normalizeParams ( params ) ,
989- } ) as ZodMiniRecord < Key , Value > ;
989+ } ) as ZodMiniRecord < ZodMiniUnion < [ Key , ZodMiniNever ] > , Value > ;
990990}
991991
992992// ZodMiniMap
@@ -1512,17 +1512,15 @@ export const stringbool: (
15121512 ) as any ;
15131513
15141514// json
1515- export type ZodMiniJSONSchema = ZodMiniLazy <
1516- ZodMiniUnion <
1517- [
1518- ZodMiniString < string > ,
1519- ZodMiniNumber < number > ,
1520- ZodMiniBoolean < boolean > ,
1521- ZodMiniNull ,
1522- ZodMiniArray < ZodMiniJSONSchema > ,
1523- ZodMiniRecord < ZodMiniString < string > , ZodMiniJSONSchema > ,
1524- ]
1525- >
1515+ export type ZodMiniJSONSchema = ZodMiniUnion <
1516+ [
1517+ ZodMiniString ,
1518+ ZodMiniNumber ,
1519+ ZodMiniBoolean ,
1520+ ZodMiniNull ,
1521+ ZodMiniArray < ZodMiniJSONSchema > ,
1522+ ZodMiniRecord < ZodMiniString < string > , ZodMiniJSONSchema > ,
1523+ ]
15261524> & {
15271525 _zod : {
15281526 input : util . JSONType ;
@@ -1531,8 +1529,8 @@ export type ZodMiniJSONSchema = ZodMiniLazy<
15311529} ;
15321530
15331531export function json ( ) : ZodMiniJSONSchema {
1534- const jsonSchema : ZodMiniJSONSchema = _lazy ( ( ) => {
1532+ const jsonSchema : any = _lazy ( ( ) => {
15351533 return union ( [ string ( ) , number ( ) , boolean ( ) , _null ( ) , array ( jsonSchema ) , record ( string ( ) , jsonSchema ) ] ) ;
1536- } ) as ZodMiniJSONSchema ;
1534+ } ) ;
15371535 return jsonSchema ;
15381536}
0 commit comments