diff options
author | 2023-04-06 14:25:14 -0400 | |
---|---|---|
committer | 2023-04-06 14:25:14 -0400 | |
commit | 9e88e0f23c5913c07f7e3e96fa0555219ef710dc (patch) | |
tree | 62138079f74b3e73ee4a658c62f9bbd9da504539 | |
parent | a89963ed4661ac2309fc89695abe685166ee8e1b (diff) | |
download | astro-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.md | 5 | ||||
-rw-r--r-- | packages/astro/src/content/template/types.d.ts | 7 |
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> |