code: function clearField (index, properties) {
    // Aliased fields reflect values on other fields and do not need to be cleared.
    if (properties.isAlias === true) {
      return
    }
  
    // If the property value is already not set, there's nothing to do.
    if (typeof this[properties.name] === 'undefined') {
      return
    }
  
    // In case of object & array, they must be initialized immediately.
    if (properties.type === 'object') {
      if (this[properties.name] !== null && this[properties.name].clear) {
        this[properties.name].clear()
        writeValue.call(this[_privateKey]._this, undefined, properties)
      } else {
        writeValue.call(this[_privateKey]._this, undefined, properties)
      }
  
      // Native arrays are never used so that toArray can be globally supported.
      // Additionally, other properties such as unique rely on passing through Document.
    } else if (properties.type === 'array') {
      this[properties.name].length = 0
  
      // Other field types can simply have their value set to undefined.
    } else {
      writeValue.call(this[_privateKey]._this, undefined, properties)
    }
  }
docs: Reset field to default value.