@@ -19,8 +19,6 @@ declare module 'astro:content' {
19
19
}
20
20
21
21
declare module 'astro:content' {
22
- export { z } from 'astro/zod' ;
23
-
24
22
type Flatten < T > = T extends { [ K : string ] : infer U } ? U : never ;
25
23
26
24
export type CollectionKey = keyof AnyEntryMap ;
@@ -29,53 +27,6 @@ declare module 'astro:content' {
29
27
export type ContentCollectionKey = keyof ContentEntryMap ;
30
28
export type DataCollectionKey = keyof DataEntryMap ;
31
29
32
- // This needs to be in sync with ImageMetadata
33
- export type ImageFunction = ( ) => import ( 'astro/zod' ) . ZodObject < {
34
- src : import ( 'astro/zod' ) . ZodString ;
35
- width : import ( 'astro/zod' ) . ZodNumber ;
36
- height : import ( 'astro/zod' ) . ZodNumber ;
37
- format : import ( 'astro/zod' ) . ZodUnion <
38
- [
39
- import ( 'astro/zod' ) . ZodLiteral < 'png' > ,
40
- import ( 'astro/zod' ) . ZodLiteral < 'jpg' > ,
41
- import ( 'astro/zod' ) . ZodLiteral < 'jpeg' > ,
42
- import ( 'astro/zod' ) . ZodLiteral < 'tiff' > ,
43
- import ( 'astro/zod' ) . ZodLiteral < 'webp' > ,
44
- import ( 'astro/zod' ) . ZodLiteral < 'gif' > ,
45
- import ( 'astro/zod' ) . ZodLiteral < 'svg' > ,
46
- import ( 'astro/zod' ) . ZodLiteral < 'avif' > ,
47
- ]
48
- > ;
49
- } > ;
50
-
51
- type BaseSchemaWithoutEffects =
52
- | import ( 'astro/zod' ) . AnyZodObject
53
- | import ( 'astro/zod' ) . ZodUnion < [ BaseSchemaWithoutEffects , ...BaseSchemaWithoutEffects [ ] ] >
54
- | import ( 'astro/zod' ) . ZodDiscriminatedUnion < string , import ( 'astro/zod' ) . AnyZodObject [ ] >
55
- | import ( 'astro/zod' ) . ZodIntersection < BaseSchemaWithoutEffects , BaseSchemaWithoutEffects > ;
56
-
57
- type BaseSchema =
58
- | BaseSchemaWithoutEffects
59
- | import ( 'astro/zod' ) . ZodEffects < BaseSchemaWithoutEffects > ;
60
-
61
- export type SchemaContext = { image : ImageFunction } ;
62
-
63
- type DataCollectionConfig < S extends BaseSchema > = {
64
- type : 'data' ;
65
- schema ?: S | ( ( context : SchemaContext ) => S ) ;
66
- } ;
67
-
68
- type ContentCollectionConfig < S extends BaseSchema > = {
69
- type ?: 'content' ;
70
- schema ?: S | ( ( context : SchemaContext ) => S ) ;
71
- } ;
72
-
73
- type CollectionConfig < S > = ContentCollectionConfig < S > | DataCollectionConfig < S > ;
74
-
75
- export function defineCollection < S extends BaseSchema > (
76
- input : CollectionConfig < S >
77
- ) : CollectionConfig < S > ;
78
-
79
30
type AllValuesOf < T > = T extends any ? T [ keyof T ] : never ;
80
31
type ValidContentEntrySlug < C extends keyof ContentEntryMap > = AllValuesOf <
81
32
ContentEntryMap [ C ]
@@ -685,5 +636,5 @@ declare module 'astro:content' {
685
636
686
637
type AnyEntryMap = ContentEntryMap & DataEntryMap ;
687
638
688
- type ContentConfig = typeof import ( "../src/content/config" ) ;
639
+ export type ContentConfig = typeof import ( "../src/content/config.js " ) ;
689
640
}
0 commit comments