Skip to content

ApplyGlobalDepthPopulate

ApplyGlobalDepthPopulate<TGlobalSlug, TPopulate> = TGlobalSlug extends keyof GlobalDocumentBySlug ? { [K in keyof GlobalDocumentBySlug[TGlobalSlug]]: K extends keyof TPopulate ? K extends string ? GlobalRelationshipTargetOf<TGlobalSlug, K> extends infer Target ? Target extends CollectionSlug ? Target extends keyof DocumentBySlug ? TPopulate[K] extends { populate: infer NestedPopulate } ? NestedPopulate extends PopulateShape<Target> ? (…)[] : (…)[] : ((…) | (…))[] : GlobalDocumentBySlug[TGlobalSlug][K] : GlobalDocumentBySlug[TGlobalSlug][K] : GlobalDocumentBySlug[TGlobalSlug][K] : GlobalDocumentBySlug[TGlobalSlug][K] : GlobalDocumentBySlug[TGlobalSlug][K] } : never

Defined in: packages/core/src/db/types.ts:562

Unconstrained counterpart of GlobalPopulated for GetGlobalReturn’s own depth branch — same rationale as ApplyDepthPopulate: GlobalDepthPopulate’s walk is valid by construction, so nothing needs to re-verify it against GlobalPopulateShape’s own constraint (which would otherwise need the same expensive & GlobalPopulateShape<TGlobalSlug> bridge DepthPopulated used to need). Internal-use only.

TGlobalSlug extends GlobalSlug

TPopulate