From 9e88e0f23c5913c07f7e3e96fa0555219ef710dc Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Thu, 6 Apr 2023 14:25:14 -0400 Subject: [PATCH] Fix: remove `slug()` from `defineCollection()` (#6774) * fix: remove `slug()` from `defineCollection()` * chore: changeset --- .changeset/good-gorillas-compare.md | 5 +++++ packages/astro/src/content/template/types.d.ts | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 .changeset/good-gorillas-compare.md diff --git a/.changeset/good-gorillas-compare.md b/.changeset/good-gorillas-compare.md new file mode 100644 index 000000000000..2c154963d1fc --- /dev/null +++ b/.changeset/good-gorillas-compare.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix: remove old `slug()` type from `defineCollection()` helper diff --git a/packages/astro/src/content/template/types.d.ts b/packages/astro/src/content/template/types.d.ts index 28da29ce1f10..7bb36c0f8d69 100644 --- a/packages/astro/src/content/template/types.d.ts +++ b/packages/astro/src/content/template/types.d.ts @@ -67,13 +67,6 @@ declare module 'astro:content' { type BaseCollectionConfig = { schema?: S | ((context: SchemaContext) => S); - slug?: (entry: { - id: CollectionEntry['id']; - defaultSlug: string; - collection: string; - body: string; - data: import('astro/zod').infer; - }) => string | Promise; }; export function defineCollection( input: BaseCollectionConfig