Skip to content

GlobalPopulated

GlobalPopulated<TGlobalSlug, TPopulate> = TGlobalSlug extends keyof GlobalDocumentBySlug ? { [K in keyof GlobalDocumentBySlug[TGlobalSlug]]: K extends keyof TPopulate ? K extends string ? GlobalDocumentBySlug[TGlobalSlug][K] extends string | undefined ? TPopulate[K] extends { populate: infer _NestedPopulate } ? Record<string, unknown>[] : Record<string, unknown>[] : GlobalDocumentBySlug[TGlobalSlug][K] : GlobalDocumentBySlug[TGlobalSlug][K] : GlobalDocumentBySlug[TGlobalSlug][K] } : never

Defined in: packages/core/src/types/generated.ts:365

Return type of globals.get when populate is provided. Maps over GlobalDocumentBySlug[TGlobalSlug] replacing each populated relationship field’s string type with Doc<TargetSlug>[].

Mirrors Populated<TCollectionSlug, TPopulate> from the collection API; operates on GlobalDocumentBySlug instead of DocumentBySlug.

TGlobalSlug extends GlobalSlug

The global slug.

TPopulate extends GlobalPopulateShape<TGlobalSlug>

The populate options object.