---
title: type
framework: CloudKit JS
role: symbol
role_heading: Instance Property
platforms: [cloudkit js 1.0+]
path: cloudkitjs/cloudkit.recordfield/type
---

# type

The type of the field.

## Declaration

```data
attribute String type;
```

## Discussion

Discussion This key is optional when saving a record; otherwise, this key is required. See CKValue for the JavaScript types you should use for the values of schema field types.
