VexDocumentGlobal
Defined in: packages/core/src/types/generated.ts:320
Flat global document returned by globals.get and globals.find.
Extends VexDocument (inheriting _id: string and _creationTime: number)
and adds _slug: TSlug as the discriminator field. The generated per-global
interfaces (e.g. SiteSettingsGlobal) extend this type and add user fields.
When called with a typed TSlug, globals.get returns
GlobalDocumentBySlug[TSlug] (the concrete generated interface), not this
base type. This type is the fallback for unnarrowed contexts (e.g. the return
of findGlobals).
Example
Section titled “Example”const doc: VexDocumentGlobal<"siteSettings"> = ...;doc._slug; // "siteSettings"doc._id; // string (from VexDocument)doc._creationTime; // number (from VexDocument)// user fields are accessible via the index signature: doc["siteName"]VexDocument for the base type
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”TSlug extends GlobalSlug = GlobalSlug
The global slug. Defaults to GlobalSlug (all slugs).
Indexable
Section titled “Indexable”[
key:string]:unknown
Field values defined by the collection schema.
Properties
Section titled “Properties”_creationTime
Section titled “_creationTime”_creationTime:
number
Defined in: packages/core/src/api/convex.ts:26
Unix timestamp (milliseconds) when the document was created.
Inherited from
Section titled “Inherited from”_id:
string
Defined in: packages/core/src/api/convex.ts:24
Convex document ID string.
Inherited from
Section titled “Inherited from”_slug:
TSlug
Defined in: packages/core/src/types/generated.ts:326
The global slug — uniquely identifies which global this document is.
Renamed from slug (the DB column name) at the API layer to avoid
collisions with user-defined field keys.