Skip to content

Commit 30aec73

Browse files
authored
fix: loosen the BaseSchema type (#13734)
1 parent bfea0fb commit 30aec73

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

.changeset/bright-breads-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Loosen content layer schema types

packages/astro/types/content.d.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,7 @@ 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-
56-
type BaseSchemaWithoutEffects =
57-
| BaseAtomicSchema
58-
| BaseCompositeSchema
59-
| import('astro/zod').ZodIntersection<BaseAtomicSchema, BaseAtomicSchema | BaseCompositeSchema>;
60-
61-
export type BaseSchema =
62-
| BaseSchemaWithoutEffects
63-
| import('astro/zod').ZodEffects<BaseSchemaWithoutEffects>;
48+
export type BaseSchema = import('astro/zod').ZodType
6449

6550
export type SchemaContext = { image: ImageFunction };
6651

0 commit comments

Comments
 (0)