A datatype represents a named, standalone type definition.

interface DatatypeElement {
    constructor: any;
    access?: Definition;
    asOf?: `${number}.${number}`;
    byteSize?: ByteSize;
    children?: FieldElement[];
    conformance?: Definition;
    constraint?: Definition;
    default?: FieldValue;
    description?: string;
    details?: string;
    id?: undefined;
    isGlobal?: boolean;
    isSeed?: boolean;
    metatype?:
        | "string"
        | "boolean"
        | "object"
        | "bytes"
        | "any"
        | "bitmap"
        | "enum"
        | "integer"
        | "float"
        | "array"
        | "date";
    name: string;
    quality?: Definition;
    tag: "datatype";
    type?: string;
    until?: `${number}.${number}`;
    xref?: Specification.CrossReference;
}

Hierarchy (view full)

Implemented by

Constructors

constructor: any

Properties

access?: Definition

Authorization limits.

asOf?: `${number}.${number}`

The first Matter specification in which this element appears.

byteSize?: ByteSize

Applies to numeric types.

children?: FieldElement[]

Child elements.

conformance?: Definition

Optionality control.

constraint?: Definition

Limits on values.

default?: FieldValue

The default value for the element.

description?: string

A short summary of the element.

details?: string

A paragraph summary of the element.

id?: undefined

You can only reference a datatype by name. It does not have an ID.

isGlobal?: boolean

Is this a global element? Global elements are available in-scope for every cluster.

isSeed?: boolean

Is this a "seed" element? These are global types and cluster elements defined in the core specification, without which we are fairly incapacitated.

metatype?:
    | "string"
    | "boolean"
    | "object"
    | "bytes"
    | "any"
    | "bitmap"
    | "enum"
    | "integer"
    | "float"
    | "array"
    | "date"

A "metatype" provides enough semantics for us to translate a value into a native datatype. Metatype is only required on global datatypes, and only when the datatype should map directly to a specific native (JS) type.

name: string

The key used for storing this element. A "human appropriate" semantic differentiator.

quality?: Definition

Other qualities not covered by conformance or access.

tag
type?: string

If an element derives from another element, the name of the parent element goes here.

until?: `${number}.${number}`

The Matter specification revision in which this element was removed.

Reference to Matter specification document.