From 8cfc1c3b0a551727adb7365823ebe18387071c74 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Fri, 22 Nov 2024 22:37:19 +0200 Subject: [PATCH] --- .astro/astro/content.d.ts | 7 +++++++ .astro/content.d.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.astro/astro/content.d.ts b/.astro/astro/content.d.ts index 09971962..2badc4f3 100644 --- a/.astro/astro/content.d.ts +++ b/.astro/astro/content.d.ts @@ -21,9 +21,11 @@ declare module 'astro:content' { type Flatten = T extends { [K: string]: infer U } ? U : never; export type CollectionKey = keyof AnyEntryMap; + export type CollectionEntry = Flatten; export type ContentCollectionKey = keyof ContentEntryMap; + export type DataCollectionKey = keyof DataEntryMap; type AllValuesOf = T extends any ? T[keyof T] : never; @@ -53,6 +55,7 @@ declare module 'astro:content' { collection: C, filter?: (entry: CollectionEntry) => entry is E, ): Promise; + export function getCollection( collection: C, filter?: (entry: CollectionEntry) => unknown, @@ -67,6 +70,7 @@ declare module 'astro:content' { }): E extends ValidContentEntrySlug ? Promise> : Promise | undefined>; + export function getEntry< C extends keyof DataEntryMap, E extends keyof DataEntryMap[C] | (string & {}), @@ -76,6 +80,7 @@ declare module 'astro:content' { }): E extends keyof DataEntryMap[C] ? Promise : Promise | undefined>; + export function getEntry< C extends keyof ContentEntryMap, E extends ValidContentEntrySlug | (string & {}), @@ -85,6 +90,7 @@ declare module 'astro:content' { ): E extends ValidContentEntrySlug ? Promise> : Promise | undefined>; + export function getEntry< C extends keyof DataEntryMap, E extends keyof DataEntryMap[C] | (string & {}), @@ -102,6 +108,7 @@ declare module 'astro:content' { slug: ValidContentEntrySlug; }[], ): Promise[]>; + export function getEntries( entries: { collection: C; diff --git a/.astro/content.d.ts b/.astro/content.d.ts index 71b510bb..29bb5304 100644 --- a/.astro/content.d.ts +++ b/.astro/content.d.ts @@ -21,9 +21,11 @@ declare module 'astro:content' { type Flatten = T extends { [K: string]: infer U } ? U : never; export type CollectionKey = keyof AnyEntryMap; + export type CollectionEntry = Flatten; export type ContentCollectionKey = keyof ContentEntryMap; + export type DataCollectionKey = keyof DataEntryMap; type AllValuesOf = T extends any ? T[keyof T] : never; @@ -53,6 +55,7 @@ declare module 'astro:content' { collection: C, filter?: (entry: CollectionEntry) => entry is E, ): Promise; + export function getCollection( collection: C, filter?: (entry: CollectionEntry) => unknown, @@ -67,6 +70,7 @@ declare module 'astro:content' { }): E extends ValidContentEntrySlug ? Promise> : Promise | undefined>; + export function getEntry< C extends keyof DataEntryMap, E extends keyof DataEntryMap[C] | (string & {}), @@ -76,6 +80,7 @@ declare module 'astro:content' { }): E extends keyof DataEntryMap[C] ? Promise : Promise | undefined>; + export function getEntry< C extends keyof ContentEntryMap, E extends ValidContentEntrySlug | (string & {}), @@ -85,6 +90,7 @@ declare module 'astro:content' { ): E extends ValidContentEntrySlug ? Promise> : Promise | undefined>; + export function getEntry< C extends keyof DataEntryMap, E extends keyof DataEntryMap[C] | (string & {}), @@ -102,6 +108,7 @@ declare module 'astro:content' { slug: ValidContentEntrySlug; }[], ): Promise[]>; + export function getEntries( entries: { collection: C;