diff --git a/.changeset/bright-breads-report.md b/.changeset/bright-breads-report.md new file mode 100644 index 000000000000..3b21ffd0aebb --- /dev/null +++ b/.changeset/bright-breads-report.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Loosen content layer schema types diff --git a/packages/astro/types/content.d.ts b/packages/astro/types/content.d.ts index 51516b8acf69..e86bdb469047 100644 --- a/packages/astro/types/content.d.ts +++ b/packages/astro/types/content.d.ts @@ -45,22 +45,7 @@ declare module 'astro:content' { has: (key: string) => boolean; } - type BaseAtomicSchema = import('astro/zod').AnyZodObject; - - type BaseCompositeSchema = - | import('astro/zod').ZodUnion<[BaseAtomicSchema, ...BaseAtomicSchema[]]> - | import('astro/zod').ZodDiscriminatedUnion - // If we have a union of unions, give up on trying to type-check it all. You're on your own. - | import('astro/zod').ZodUnion<[import('astro/zod').ZodUnion, ...z.any[]]>; - - type BaseSchemaWithoutEffects = - | BaseAtomicSchema - | BaseCompositeSchema - | import('astro/zod').ZodIntersection; - - export type BaseSchema = - | BaseSchemaWithoutEffects - | import('astro/zod').ZodEffects; + export type BaseSchema = import('astro/zod').ZodType export type SchemaContext = { image: ImageFunction };