File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' astro ' : patch
3+ ---
4+
5+ Fixes typechecking for content config schema
Original file line number Diff line number Diff line change @@ -45,11 +45,18 @@ declare module 'astro:content' {
4545 has : ( key : string ) => boolean ;
4646 }
4747
48+ type BaseAtomicSchema = import ( 'astro/zod' ) . AnyZodObject ;
49+
50+ type BaseCompositeSchema =
51+ | import ( 'astro/zod' ) . ZodUnion < [ BaseAtomicSchema , ...BaseAtomicSchema [ ] ] >
52+ | import ( 'astro/zod' ) . ZodDiscriminatedUnion < string , BaseAtomicSchema [ ] >
53+ // If we have a union of unions, give up on trying to type-check it all. You're on your own.
54+ | import ( 'astro/zod' ) . ZodUnion < [ import ( 'astro/zod' ) . ZodUnion < z . any > , ...z . any [ ] ] >
55+
4856 type BaseSchemaWithoutEffects =
49- | import ( 'astro/zod' ) . AnyZodObject
50- | import ( 'astro/zod' ) . ZodUnion < [ BaseSchemaWithoutEffects , ...BaseSchemaWithoutEffects [ ] ] >
51- | import ( 'astro/zod' ) . ZodDiscriminatedUnion < string , import ( 'astro/zod' ) . AnyZodObject [ ] >
52- | import ( 'astro/zod' ) . ZodIntersection < BaseSchemaWithoutEffects , BaseSchemaWithoutEffects > ;
57+ | BaseAtomicSchema
58+ | BaseCompositeSchema
59+ | import ( 'astro/zod' ) . ZodIntersection < BaseAtomicSchema , BaseAtomicSchema | BaseCompositeSchema > ;
5360
5461 export type BaseSchema =
5562 | BaseSchemaWithoutEffects
You can’t perform that action at this time.
0 commit comments