Fix: remove slug()
from defineCollection()
(#6774)
* fix: remove `slug()` from `defineCollection()` * chore: changeset
This commit is contained in:
parent
a89963ed46
commit
9e88e0f23c
2 changed files with 5 additions and 7 deletions
5
.changeset/good-gorillas-compare.md
Normal file
5
.changeset/good-gorillas-compare.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix: remove old `slug()` type from `defineCollection()` helper
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue