summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2023-04-06 14:25:14 -0400
committerGravatar GitHub <noreply@github.com> 2023-04-06 14:25:14 -0400
commit9e88e0f23c5913c07f7e3e96fa0555219ef710dc (patch)
tree62138079f74b3e73ee4a658c62f9bbd9da504539
parenta89963ed4661ac2309fc89695abe685166ee8e1b (diff)
downloadastro-9e88e0f23c5913c07f7e3e96fa0555219ef710dc.tar.gz
astro-9e88e0f23c5913c07f7e3e96fa0555219ef710dc.tar.zst
astro-9e88e0f23c5913c07f7e3e96fa0555219ef710dc.zip
Fix: remove `slug()` from `defineCollection()` (#6774)
* fix: remove `slug()` from `defineCollection()` * chore: changeset
-rw-r--r--.changeset/good-gorillas-compare.md5
-rw-r--r--packages/astro/src/content/template/types.d.ts7
2 files changed, 5 insertions, 7 deletions
diff --git a/.changeset/good-gorillas-compare.md b/.changeset/good-gorillas-compare.md
new file mode 100644
index 000000000..2c154963d
--- /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 28da29ce1..7bb36c0f8 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<S extends BaseSchema> = {
schema?: S | ((context: SchemaContext) => S);
- slug?: (entry: {
- id: CollectionEntry<keyof typeof entryMap>['id'];
- defaultSlug: string;
- collection: string;
- body: string;
- data: import('astro/zod').infer<S>;
- }) => string | Promise<string>;
};
export function defineCollection<S extends BaseSchema>(
input: BaseCollectionConfig<S>