@@ -1336,15 +1336,15 @@ describe('zodv4', () => {
1336
1336
export function BookSchema(): z.ZodObject<Properties<Book>> {
1337
1337
return z.object({
1338
1338
__typename: z.literal('Book').optional(),
1339
- author: AuthorSchema().nullish(),
1339
+ author: z.lazy(() => AuthorSchema().nullish() ),
1340
1340
title: z.string().nullish()
1341
1341
})
1342
1342
}
1343
1343
1344
1344
export function AuthorSchema(): z.ZodObject<Properties<Author>> {
1345
1345
return z.object({
1346
1346
__typename: z.literal('Author').optional(),
1347
- books: z.array(BookSchema().nullable()).nullish(),
1347
+ books: z.array(z.lazy(() => BookSchema().nullable() )).nullish(),
1348
1348
name: z.string().nullish()
1349
1349
})
1350
1350
}
@@ -1621,7 +1621,7 @@ describe('zodv4', () => {
1621
1621
export function GeometrySchema(): z.ZodObject<Properties<Geometry>> {
1622
1622
return z.object({
1623
1623
__typename: z.literal('Geometry').optional(),
1624
- shape: ShapeSchema().nullish()
1624
+ shape: z.lazy(() => ShapeSchema().nullish() )
1625
1625
})
1626
1626
}
1627
1627
"
@@ -1772,7 +1772,7 @@ describe('zodv4', () => {
1772
1772
1773
1773
export const GeometrySchema: z.ZodObject<Properties<Geometry>> = z.object({
1774
1774
__typename: z.literal('Geometry').optional(),
1775
- shape: ShapeSchema.nullish()
1775
+ shape: z.lazy(() => ShapeSchema.nullish() )
1776
1776
});
1777
1777
"
1778
1778
` )
@@ -1924,14 +1924,14 @@ describe('zodv4', () => {
1924
1924
1925
1925
export function BookSchema(): z.ZodObject<Properties<Book>> {
1926
1926
return z.object({
1927
- author: AuthorSchema().nullish(),
1927
+ author: z.lazy(() => AuthorSchema().nullish() ),
1928
1928
title: z.string().nullish()
1929
1929
})
1930
1930
}
1931
1931
1932
1932
export function AuthorSchema(): z.ZodObject<Properties<Author>> {
1933
1933
return z.object({
1934
- books: z.array(BookSchema().nullable()).nullish(),
1934
+ books: z.array(z.lazy(() => BookSchema().nullable() )).nullish(),
1935
1935
name: z.string().nullish()
1936
1936
})
1937
1937
}
@@ -1987,15 +1987,15 @@ describe('zodv4', () => {
1987
1987
export function BookSchema(): z.ZodObject<Properties<Book>> {
1988
1988
return z.object({
1989
1989
title: z.string(),
1990
- author: AuthorSchema()
1990
+ author: z.lazy(() => AuthorSchema() )
1991
1991
})
1992
1992
}
1993
1993
1994
1994
export function TextbookSchema(): z.ZodObject<Properties<Textbook>> {
1995
1995
return z.object({
1996
1996
__typename: z.literal('Textbook').optional(),
1997
1997
title: z.string(),
1998
- author: AuthorSchema(),
1998
+ author: z.lazy(() => AuthorSchema() ),
1999
1999
courses: z.array(z.string())
2000
2000
})
2001
2001
}
@@ -2004,15 +2004,15 @@ describe('zodv4', () => {
2004
2004
return z.object({
2005
2005
__typename: z.literal('ColoringBook').optional(),
2006
2006
title: z.string(),
2007
- author: AuthorSchema(),
2007
+ author: z.lazy(() => AuthorSchema() ),
2008
2008
colors: z.array(z.string())
2009
2009
})
2010
2010
}
2011
2011
2012
2012
export function AuthorSchema(): z.ZodObject<Properties<Author>> {
2013
2013
return z.object({
2014
2014
__typename: z.literal('Author').optional(),
2015
- books: z.array(BookSchema()).nullish(),
2015
+ books: z.array(z.lazy(() => BookSchema() )).nullish(),
2016
2016
name: z.string().nullish()
2017
2017
})
2018
2018
}
0 commit comments