Skip to content

GeneratedVexTypes

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

Empty interface augmented by the generated vex.types.ts file.

When vex generate has been run, this interface gains two properties:

  • CollectionSlug — the specific union of collection slugs in the project
  • DocumentBySlug — a map of slug → document interface

When empty (before generation), all derived types fall back to their widest safe variants (string, Record<string, unknown>).

Do not populate this interface manually. It is populated by the declare module '@vexcms/core' block emitted at the bottom of the generated vex.types.ts file.

// After running `vex generate`, this interface is augmented to:
interface GeneratedVexTypes {
CollectionSlug: "posts" | "authors";
DocumentBySlug: { posts: PostsDocument; authors: AuthorsDocument };
CollectionsFieldTypeMap: {
posts: {
text: "title" | "slug" | "body";
relationship: "author" | "category";
select: "status";
date: "publishedAt";
};
authors: {
text: "name" | "email";
};
};
}