diff --git a/examples/basics/.gitignore b/examples/basics/.gitignore index 7329a851d..cfc68ec19 100644 --- a/examples/basics/.gitignore +++ b/examples/basics/.gitignore @@ -1,6 +1,8 @@ # build output dist/ .output/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/blog/.gitignore b/examples/blog/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/blog/.gitignore +++ b/examples/blog/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/docs/.gitignore b/examples/docs/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/docs/.gitignore +++ b/examples/docs/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-alpine/.gitignore b/examples/framework-alpine/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-alpine/.gitignore +++ b/examples/framework-alpine/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-lit/.gitignore b/examples/framework-lit/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-lit/.gitignore +++ b/examples/framework-lit/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-multiple/.gitignore b/examples/framework-multiple/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-multiple/.gitignore +++ b/examples/framework-multiple/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-preact/.gitignore b/examples/framework-preact/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-preact/.gitignore +++ b/examples/framework-preact/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-react/.gitignore b/examples/framework-react/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-react/.gitignore +++ b/examples/framework-react/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-solid/.gitignore b/examples/framework-solid/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-solid/.gitignore +++ b/examples/framework-solid/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-svelte/.gitignore b/examples/framework-svelte/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-svelte/.gitignore +++ b/examples/framework-svelte/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/framework-vue/.gitignore b/examples/framework-vue/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/framework-vue/.gitignore +++ b/examples/framework-vue/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/hackernews/.gitignore b/examples/hackernews/.gitignore index 7329a851d..cfc68ec19 100644 --- a/examples/hackernews/.gitignore +++ b/examples/hackernews/.gitignore @@ -1,6 +1,8 @@ # build output dist/ .output/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/minimal/.gitignore b/examples/minimal/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/minimal/.gitignore +++ b/examples/minimal/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/non-html-pages/.gitignore b/examples/non-html-pages/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/non-html-pages/.gitignore +++ b/examples/non-html-pages/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/portfolio/.gitignore b/examples/portfolio/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/portfolio/.gitignore +++ b/examples/portfolio/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-content/.astro/types.d.ts b/examples/with-content/.astro/types.d.ts deleted file mode 100644 index 33d0c7c32..000000000 --- a/examples/with-content/.astro/types.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -declare module 'astro:content' { - export { z } from 'astro/zod'; - export type CollectionEntry = - (typeof entryMap)[C][keyof (typeof entryMap)[C]] & Render; - - type BaseSchemaWithoutEffects = - | import('astro/zod').AnyZodObject - | import('astro/zod').ZodUnion - | import('astro/zod').ZodDiscriminatedUnion - | import('astro/zod').ZodIntersection< - import('astro/zod').AnyZodObject, - import('astro/zod').AnyZodObject - >; - - type BaseSchema = - | BaseSchemaWithoutEffects - | import('astro/zod').ZodEffects; - - type BaseCollectionConfig = { - schema?: S; - slug?: (entry: { - id: CollectionEntry['id']; - defaultSlug: string; - collection: string; - body: string; - data: import('astro/zod').infer; - }) => string | Promise; - }; - export function defineCollection( - input: BaseCollectionConfig - ): BaseCollectionConfig; - - export function getEntry( - collection: C, - entryKey: E - ): Promise<(typeof entryMap)[C][E] & Render>; - export function getCollection< - C extends keyof typeof entryMap, - E extends keyof (typeof entryMap)[C] - >( - collection: C, - filter?: (data: (typeof entryMap)[C][E]) => boolean - ): Promise<((typeof entryMap)[C][E] & Render)[]>; - - type InferEntrySchema = import('astro/zod').infer< - Required['schema'] - >; - - type Render = { - render(): Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - }>; - }; - - const entryMap: { - blog: { - 'first-post.md': { - id: 'first-post.md'; - slug: 'first-post'; - body: string; - collection: 'blog'; - data: InferEntrySchema<'blog'>; - }; - 'markdown-style-guide.md': { - id: 'markdown-style-guide.md'; - slug: 'markdown-style-guide'; - body: string; - collection: 'blog'; - data: InferEntrySchema<'blog'>; - }; - 'second-post.md': { - id: 'second-post.md'; - slug: 'second-post'; - body: string; - collection: 'blog'; - data: InferEntrySchema<'blog'>; - }; - 'third-post.md': { - id: 'third-post.md'; - slug: 'third-post'; - body: string; - collection: 'blog'; - data: InferEntrySchema<'blog'>; - }; - 'using-mdx.mdx': { - id: 'using-mdx.mdx'; - slug: 'using-mdx'; - body: string; - collection: 'blog'; - data: InferEntrySchema<'blog'>; - }; - }; - }; - - type ContentConfig = typeof import('../src/content/config'); -} diff --git a/examples/with-content/.gitignore b/examples/with-content/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-content/.gitignore +++ b/examples/with-content/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-markdown-plugins/.gitignore b/examples/with-markdown-plugins/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-markdown-plugins/.gitignore +++ b/examples/with-markdown-plugins/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-markdown-shiki/.gitignore b/examples/with-markdown-shiki/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-markdown-shiki/.gitignore +++ b/examples/with-markdown-shiki/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-mdx/.gitignore b/examples/with-mdx/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-mdx/.gitignore +++ b/examples/with-mdx/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-nanostores/.gitignore b/examples/with-nanostores/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-nanostores/.gitignore +++ b/examples/with-nanostores/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-tailwindcss/.gitignore b/examples/with-tailwindcss/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-tailwindcss/.gitignore +++ b/examples/with-tailwindcss/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-vite-plugin-pwa/.gitignore b/examples/with-vite-plugin-pwa/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-vite-plugin-pwa/.gitignore +++ b/examples/with-vite-plugin-pwa/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/ diff --git a/examples/with-vitest/.gitignore b/examples/with-vitest/.gitignore index 02f6e50b4..6240da8b1 100644 --- a/examples/with-vitest/.gitignore +++ b/examples/with-vitest/.gitignore @@ -1,5 +1,7 @@ # build output dist/ +# generated types +.astro/ # dependencies node_modules/