Skip to content

BaseField

Defined in: packages/core/src/fields/baseTypes.ts:232

Resolved base field definition, after defaults are applied by the field config function.

Properties with defaults are always present. Properties that are meaningless when absent (description, index, searchIndex) remain optional.

BaseFieldInput for the user-facing input type

TFieldMeta extends object = { }

admin: FieldAdminConfig

Defined in: packages/core/src/fields/baseTypes.ts:243

Resolved admin UI configuration with all defaults applied.


optional defaultValue?: unknown

Defined in: packages/core/src/fields/baseTypes.ts:241

Pre-filled value shown in the admin form when creating a new field. Does not apply to database values


optional description?: string

Defined in: packages/core/src/fields/baseTypes.ts:252

Semantic description of the field. Used in three places:

  1. Helper text rendered below the field input in the admin form UI.
  2. As the Zod .meta({ description }) value for form validation.
  3. As the JSDoc comment on the generated document interface property.

To write a separate JSDoc comment, use interfaceDescription in addition.


optional index?: string

Defined in: packages/core/src/fields/baseTypes.ts:256

Convex index name for this field.


optional interfaceDescription?: string

Defined in: packages/core/src/fields/baseTypes.ts:254

The JSDoc comment on the generated document interface property


interfaceType: string

Defined in: packages/core/src/fields/baseTypes.ts:258

TypeScript type string written to generated document interfaces (e.g. "string", "number", "string[]").


label: string

Defined in: packages/core/src/fields/baseTypes.ts:234

Display label shown in the admin form. Always set — inferred from the field key if not provided.


meta: TFieldMeta

Defined in: packages/core/src/fields/baseTypes.ts:259


required: boolean

Defined in: packages/core/src/fields/baseTypes.ts:236

Whether this field is required in the database schema.