code: function fieldTypes (type) {
    switch (type) {
      case constants.ID:
      case constants.string:
        return 'string'
  
      case constants.int:
      case constants.float:
        return 'number'
  
      default:
    }
  }
docs: Convert the type of the field to return the type and check the typeof