@@ -154,11 +154,7 @@ export interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$Z
154154
155155export type $ZodStandardSchema < T > = StandardSchemaV1 . Props < core . input < T > , core . output < T > > ;
156156
157- // export interface _$ZodType<T extends _$ZodTypeInternals = _$ZodTypeInternals> {
158- // _zod: T;
159- // }
160157export type SomeType = { _zod :_$ZodTypeInternals } ;
161- // _$ZodType; //<any, any, $ZodTypeInternals<unknown, unknown>>;
162158
163159export interface $ZodType <
164160O = unknown ,
@@ -168,6 +164,10 @@ export interface $ZodType<
168164_zod :Internals ;
169165"~standard" :$ZodStandardSchema < this> ;
170166}
167+ export interface _$ZodType < T extends $ZodTypeInternals = $ZodTypeInternals >
168+ extends $ZodType < T [ "output" ] , T [ "input" ] , T > {
169+ // _zod: T;
170+ }
171171
172172export const $ZodType :core . $constructor < $ZodType > = /*@__PURE__ */ core . $constructor ( "$ZodType" , ( inst , def ) => {
173173inst ??= { } as any ;
@@ -300,8 +300,8 @@ export interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, In
300300} > ;
301301}
302302
303- export interface $ZodString < Input = unknown > extends $ZodType {
304- _zod :$ZodStringInternals < Input > ;
303+ export interface $ZodString < Input = unknown > extends _ $ZodType< $ZodStringInternals < Input > > {
304+ // _zod: $ZodStringInternals<Input>;
305305}
306306
307307export const $ZodString :core . $constructor < $ZodString > = /*@__PURE__ */ core . $constructor ( "$ZodString" , ( inst , def ) => {
@@ -1463,9 +1463,8 @@ export interface $ZodArrayInternals<T extends SomeType = $ZodType>
14631463isst :errors . $ZodIssueInvalidType ;
14641464}
14651465
1466- export interface $ZodArray < T extends SomeType = $ZodType > extends $ZodType {
1467- _zod :$ZodArrayInternals < T > ;
1468- }
1466+ export interface $ZodArray < T extends SomeType = $ZodType >
1467+ extends $ZodType < core . output < T > [ ] , core . input < T > [ ] , $ZodArrayInternals < T > > { }
14691468
14701469function handleArrayResult ( result :ParsePayload < any > , final :ParsePayload < any [ ] > , index :number ) {
14711470if ( result . issues . length ) {
@@ -1524,30 +1523,6 @@ export const $ZodArray: core.$constructor<$ZodArray> = /*@__PURE__*/ core.$const
15241523////////// //////////
15251524//////////////////////////////////////////
15261525//////////////////////////////////////////
1527- export type $ZodShape = Readonly < { [ k :string ] :$ZodType } > ;
1528-
1529- export interface $ZodObjectDef < Shape extends $ZodShape = $ZodShape > extends $ZodTypeDef {
1530- type :"object" ;
1531- shape :Shape ;
1532- catchall ?:$ZodType | undefined ;
1533- }
1534-
1535- export interface $ZodObjectInternals <
1536- /**@ts -ignore Cast variance */
1537- out Shape extends Readonly < $ZodShape > = Readonly < $ZodShape > ,
1538- out Config extends $ZodObjectConfig = $ZodObjectConfig ,
1539- > extends _$ZodTypeInternals {
1540- def :$ZodObjectDef < Shape > ;
1541- config :Config ;
1542- isst :errors . $ZodIssueInvalidType | errors . $ZodIssueUnrecognizedKeys ;
1543- propValues :util . PropValues ;
1544- // special keys only used for objects
1545- // not defined on $ZodTypeInternals (base interface) because it breaks cyclical inference
1546- // the z.infer<> util checks for these first when extracting inferred type
1547- output :$InferObjectOutput < Shape , Config [ "out" ] > ;
1548- input :$InferObjectInput < Shape , Config [ "in" ] > ;
1549- }
1550- export type $ZodLooseShape = Record < string , any > ;
15511526
15521527type OptionalOutSchema = { _zod :{ optout :"optional" } } ;
15531528type OptionalInSchema = { _zod :{ optin :"optional" } } ;
@@ -1656,12 +1631,33 @@ export type $catchall<T extends SomeType> = {
16561631in :{ [ k :string ] :core . input < T > } ;
16571632} ;
16581633
1634+ export type $ZodShape = Readonly < { [ k :string ] :$ZodType } > ;
1635+
1636+ export interface $ZodObjectDef < Shape extends $ZodShape = $ZodShape > extends $ZodTypeDef {
1637+ type :"object" ;
1638+ shape :Shape ;
1639+ catchall ?:$ZodType | undefined ;
1640+ }
1641+
1642+ export interface $ZodObjectInternals <
1643+ /**@ts -ignore Cast variance */
1644+ out Shape extends Readonly < $ZodShape > = Readonly < $ZodShape > ,
1645+ out Config extends $ZodObjectConfig = $ZodObjectConfig ,
1646+ > extends _$ZodTypeInternals {
1647+ def :$ZodObjectDef < Shape > ;
1648+ config :Config ;
1649+ isst :errors . $ZodIssueInvalidType | errors . $ZodIssueUnrecognizedKeys ;
1650+ propValues :util . PropValues ;
1651+ output :$InferObjectOutput < Shape , Config [ "out" ] > ;
1652+ input :$InferObjectInput < Shape , Config [ "in" ] > ;
1653+ }
1654+ export type $ZodLooseShape = Record < string , any > ;
1655+
16591656export interface $ZodObject <
16601657/**@ts -ignore Cast variance */
16611658out Shape extends Readonly < $ZodShape > = Readonly < $ZodShape > ,
16621659out Params extends $ZodObjectConfig = $ZodObjectConfig ,
16631660> extends $ZodType < any , any , $ZodObjectInternals < Shape , Params > > {
1664- // _zod: $ZodObjectInternals<Shape, Params>;
16651661"~standard" :$ZodStandardSchema < this> ;
16661662}
16671663