DocumentBySlug
DocumentBySlug =
GeneratedVexTypesextendsobject?D:Record<string,unknown>
Defined in: packages/core/src/types/generated.ts:153
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 }.
Pass an entry as useFieldsForm’s TData to type a form’s submitted value
per collection, e.g. useFieldsForm<DocumentBySlug["posts"]>(...).
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