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

    Function defaultRecordValue

    • Compute the default value for a freshly added record / array entry based on the value-type schema. Falls back to a type-appropriate empty value when the schema does not declare a default.

      The switch is exhaustive over WalkedField.type so a new schema variant added to the walker forces a deliberate choice of default here rather than silently producing undefined.

      Parameters

      Returns unknown