Skip to content

PrimitiveDataType

PrimitiveDataType = "boolean" | "id" | "integer" | "string" | "number"

Names the scalar data types a Property or input value can hold.

  • 'boolean': a JavaScript boolean.
  • 'id': a lowercase UUID-shaped string of 8-4-4-4-12 hex digits; the version bits are not checked and incoming values are lowercased.
  • 'integer': a safe integer, between Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER.
  • 'number': a finite IEEE 754 double; NaN and the infinities are rejected.
  • 'string': a JavaScript string.

The Runtime validates values against these rules whenever it converts between the canonical JSON form, the stored form and the in-memory form. In strict mode an invalid value throws; in tolerant mode it is dropped and reads back as undefined.

Persistence