Analyzes a ClusterBehavior implementation to ensure it conforms to the Matter specification.

As this API is accessible via vanilla JavaScript, validation includes tests for errors that TypeScript otherwise prevents.

Records elements supported and a list of errors if validation fails.

Constructors

Properties

Methods

Constructors

  • Obtain validation information.

    Validation may run against the type alone or with a specific instance of the behavior. The latter option allows for per-instance specialization.

    Parameters

    Returns ValidatedElements

Properties

attributes: Set<string>

Supported attributes.

commands: Set<string>

Supported commands.

errors?: {
    element: string;
    fatal: boolean;
    message: string;
}[]

A list of implementation errors, if any.

events: Set<string>

Supported events.

Methods

  • If there are errors, log and throw an exception.

    Returns void