TypedCustomFieldConfig

TypedCustomFieldConfig

TypedCustomFieldConfig

Configures a custom field on an entity in the CustomFields config object.

Signature

type TypedCustomFieldConfig<T extends CustomFieldType, C extends CustomField> = Omit<
    C,
    '__typename'
> & {
    type: T;
    /**
     * Whether or not the custom field is available via the Shop API.
     * @default true
     */
    public?: boolean;
    defaultValue?: DefaultValueType<T>;
    nullable?: boolean;
    validate?: (value: DefaultValueType<T>) => string | LocalizedString[] | void;
}