summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/content-types.template.d.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/astro/content-types.template.d.ts b/packages/astro/content-types.template.d.ts
index 277d00acf..c164fc297 100644
--- a/packages/astro/content-types.template.d.ts
+++ b/packages/astro/content-types.template.d.ts
@@ -10,7 +10,9 @@ declare module 'astro:content' {
declare module 'astro:content' {
export { z } from 'astro/zod';
- export type CollectionEntry<C extends keyof AnyEntryMap> = AnyEntryMap[C][keyof AnyEntryMap[C]];
+
+ type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
+ export type CollectionEntry<C extends keyof AnyEntryMap> = Flatten<AnyEntryMap[C]>;
// TODO: Remove this when having this fallback is no longer relevant. 2.3? 3.0? - erika, 2023-04-04
/**