Skip to content

Commit

Permalink
Fix: remove slug() from defineCollection() (#6774)
Browse files Browse the repository at this point in the history
* fix: remove `slug()` from `defineCollection()`

* chore: changeset
  • Loading branch information
bholmesdev authored Apr 6, 2023
1 parent a89963e commit 9e88e0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/good-gorillas-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix: remove old `slug()` type from `defineCollection()` helper
7 changes: 0 additions & 7 deletions packages/astro/src/content/template/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 9e88e0f

Please sign in to comment.