mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Use more permissive type for defineCollection
schema option (#8163)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
parent
d08c83ee3f
commit
179796405e
2 changed files with 7 additions and 5 deletions
5
.changeset/unlucky-cougars-heal.md
Normal file
5
.changeset/unlucky-cougars-heal.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Make typing of `defineCollection` more permissive to support advanced union and intersection types
|
7
packages/astro/content-types.template.d.ts
vendored
7
packages/astro/content-types.template.d.ts
vendored
|
@ -53,12 +53,9 @@ declare module 'astro:content' {
|
|||
|
||||
type BaseSchemaWithoutEffects =
|
||||
| import('astro/zod').AnyZodObject
|
||||
| import('astro/zod').ZodUnion<import('astro/zod').AnyZodObject[]>
|
||||
| import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]>
|
||||
| import('astro/zod').ZodDiscriminatedUnion<string, import('astro/zod').AnyZodObject[]>
|
||||
| import('astro/zod').ZodIntersection<
|
||||
import('astro/zod').AnyZodObject,
|
||||
import('astro/zod').AnyZodObject
|
||||
>;
|
||||
| import('astro/zod').ZodIntersection<BaseSchemaWithoutEffects, BaseSchemaWithoutEffects>;
|
||||
|
||||
type BaseSchema =
|
||||
| BaseSchemaWithoutEffects
|
||||
|
|
Loading…
Reference in a new issue