summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/astro/src/content/template/types.d.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/astro/src/content/template/types.d.ts b/packages/astro/src/content/template/types.d.ts
index 81ea9a95e..628f5d18d 100644
--- a/packages/astro/src/content/template/types.d.ts
+++ b/packages/astro/src/content/template/types.d.ts
@@ -44,10 +44,10 @@ declare module 'astro:content' {
): E extends ValidEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
- export function getCollection<C extends keyof typeof entryMap>(
+ export function getCollection<C extends keyof typeof entryMap, E extends CollectionEntry<C>>(
collection: C,
- filter?: (data: CollectionEntry<C>) => boolean
- ): Promise<CollectionEntry<C>[]>;
+ filter?: (entry: CollectionEntry<C>) => entry is E
+ ): Promise<E[]>;
type InferEntrySchema<C extends keyof typeof entryMap> = import('astro/zod').infer<
Required<ContentConfig['collections'][C]>['schema']