Sanity Library Reference Docs
    Preparing search index...

    Function defineArrayMember

    • Beta

      Define an array item member type within an array definition of-array.

      This function will narrow the schema type down to fields and options based on the provided type string.

      Using defineArrayMember is optional, but should provide improved autocompletion in your IDE, when building your schema. Field properties like validation and initialValue will also be more specific.

      See defineType for example usage.

      Returns any

      • defineType
      • defineField
      • typed