schema-components - v3.7.0
    Preparing search index...

    Interface NumberField

    Properties common to every WalkedField variant. The type field acts as the discriminant for the tagged union.

    interface NumberField {
        editability: Editability;
        meta: SchemaMeta;
        isOptional?: boolean;
        isNullable?: boolean;
        defaultValue?: unknown;
        examples?: unknown[];
        type: "number";
        constraints: NumberConstraints;
        isInteger: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    editability: Editability
    isOptional?: boolean

    Whether the field is optional (not in required).

    isNullable?: boolean

    Whether the field is nullable (anyOf [T, null] or type: ["...", "null"]).

    defaultValue?: unknown

    Default value from the schema's default keyword.

    examples?: unknown[]

    Example values from the schema's examples keyword.

    type: "number"
    constraints: NumberConstraints
    isInteger: boolean

    True when the underlying schema declared type: "integer" rather than type: "number". Renderers consult this to set HTML inputmode="numeric" and step="1" (for whole-number editing) instead of inputmode="decimal".