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 = AnyEntryMap[C][keyof AnyEntryMap[C]]; + + type Flatten = T extends { [K: string]: infer U } ? U : never; + export type CollectionEntry = Flatten; // TODO: Remove this when having this fallback is no longer relevant. 2.3? 3.0? - erika, 2023-04-04 /**