DepthPopulated
DepthPopulated<
TCollectionSlug,D> =numberextendsD?VexDocument:Dextends0?TCollectionSlugextends keyofDocumentBySlug?DocumentBySlug[TCollectionSlug] :never:TCollectionSlugextends keyofDocumentBySlug?Prettify<Populated<TCollectionSlug,DepthPopulate<TCollectionSlug,D>>> :never
Defined in: packages/core/src/api/types.ts:479
Return type of find / get / search when depth is provided instead
of an explicit populate object.
Delegates to Populated<TCollectionSlug, DepthPopulate<TCollectionSlug, D>> — the same type
the explicit populate path produces — so the narrowed shape is identical to
what you would get by writing all relationship keys by hand.
Non-literal fallback: number extends D (i.e., D is not a literal)
short-circuits to VexDocument to avoid evaluating an infinite recursive
type. depth is only called internally with literal values (1), so this
only fires when depth comes from a non-literal number variable.
depth: 0 (the default) returns raw un-populated docs — identical to
omitting both depth and populate.
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends CollectionSlug
The collection slug.
D extends number
The depth literal.