Class DynamicSemantics

A type for semantic data that whose identity property is defined with the JSON.stringify function. dynamically, on every change. A value property holds the semantic information and for that the JSON.stringify method is called for the new identity property.

In order for identity to be updated on every value change, value is acceessed via a getter/setter interface that does the necessary bookeeping.

See

Identifiable

Hierarchy

  • DynamicSemantics

Implements

Constructors

Properties

Accessors

Constructors

Properties

_identity: string

The internal identifier state used to keep track of the value status.

It is only assigned implicitly when the setter for value is called.

_value: unknown

The internal value object to be stored.

The interface to it consists of a getter and a setter that updates the _identity internal property according to the new value.

Accessors

  • get value(): unknown
  • Accesses the value property.

    Returns unknown

  • set value(value: unknown): void
  • Updates the identity property by calling JSON.stringify on the changed semantic value.

    Parameters

    • value: unknown

    Returns void