Skip to content

CollectionsPopulateMap

CollectionsPopulateMap = GeneratedVexTypes extends object ? M : Record<string, Record<string, never>>

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

Per-collection populate map. Augmented by vex generate from the user’s collection configs — the structural counterpart of CollectionsFieldTypeMap, except it describes WHERE a relationship/upload field lives in the field tree (including nested inside group()/array()/blocks()) rather than just which top-level keys share a field type. Powers PopulateShape and Populated so populate/depth can reach a nested field, not only a top-level one.

A field (or a group()/blocks() container holding nothing populatable at any depth) is omitted entirely — only reachable paths appear.

Empty by default; the user’s vex.types.ts augments it via declare module "@vexcms/core".

Generated content after running vex generate

declare module "@vexcms/core" {
interface GeneratedVexTypes {
CollectionsPopulateMap: {
posts: {
author: { kind: "relationship"; target: "authors" };
body: {
kind: "blocks";
blocks: { hero: { image: { kind: "upload"; target: "images" } } };
};
};
};
}
}