Chatoyant - v0.2.1
    Preparing search index...

    Interface FieldDescriptor<T>

    Internal field descriptor stored on schema instances. Contains the runtime value and metadata for JSON Schema generation.

    interface FieldDescriptor<T = unknown> {
        __field: true;
        type: JSONSchemaType | "enum" | "literal";
        value: T;
        defaultValue: T;
        options: BaseFieldOptions & Record<string, unknown>;
        items?: FieldDescriptor<unknown>;
        schema?: SchemaConstructor<SchemaInstance>;
        enumValues?: readonly unknown[];
        literalValue?: unknown;
    }

    Type Parameters

    • T = unknown
    Index

    Properties

    __field: true

    Marker to identify field descriptors

    type: JSONSchemaType | "enum" | "literal"

    JSON Schema type

    value: T

    Current value

    defaultValue: T

    Default value for reset/initialization

    options: BaseFieldOptions & Record<string, unknown>

    Field configuration options

    items?: FieldDescriptor<unknown>

    For array fields: the item descriptor

    For object fields: the nested schema constructor

    enumValues?: readonly unknown[]

    For enum fields: the allowed values

    literalValue?: unknown

    For literal fields: the exact value