Fix: remove slug() from defineCollection() (#6774)

* fix: remove `slug()` from `defineCollection()`

* chore: changeset
This commit is contained in:
Ben Holmes 2023-04-06 14:25:14 -04:00 committed by GitHub
parent a89963ed46
commit 9e88e0f23c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix: remove old `slug()` type from `defineCollection()` helper

View file

@ -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>