DocumentBySlug
DocumentBySlug =
GeneratedVexTypesextendsobject?D:Record<string,unknown>
Defined in: packages/core/src/types/generated.ts:85
Maps each collection slug to its generated document interface.
- Before
vex generate: resolves toRecord<string, unknown>. - After
vex generate: resolves to a typed map, e.g.{ posts: PostsDocument; authors: AuthorsDocument }.
Used by useCollectionForm to type the document prop per collection.
Example
Section titled “Example”// After generation:import type { DocumentBySlug } from "@vexcms/core"type Post = DocumentBySlug["posts"] // → PostsDocumenttype Author = DocumentBySlug["authors"] // → AuthorsDocumentGeneratedVexTypes for the augmentation interface