Interface: DataBusItemPublisher<T>
Defined in: src/sdk/data/DataBus.ts:89
A publisher that publishes changes to a DataItem from a data bus.
See
Type Parameters
| Type Parameter | Description |
|---|---|
T | The value type of the publisher's data item. |
Methods
defineEquality()
defineEquality(
equalityFunc):this
Defined in: src/sdk/data/DataBus.ts:100
Defines equality semantics for this publisher's data item values. The specified equality semantics will be used to determine whether to notify subscribers when an update to the data item is published (subscribers are notified if and only if either the new data item value or status is not equal to the old data item value or status, respectively).
Parameters
| Parameter | Type | Description |
|---|---|---|
equalityFunc | (a, b) => boolean | undefined | A function that implements the desired equality semantics by returning whether two data item values are equal. If not defined, then default equality semantics will be used, which state that two values a and b are equal if and only if the strict equality operator (===) evaluates to true for a and b, or both a and b are the numeric value NaN. |
Returns
this
publish()
Call Signature
publish(
status,value):void
Defined in: src/sdk/data/DataBus.ts:107
Publishes an empty-value update to this publisher's data item.
Parameters
| Parameter | Type | Description |
|---|---|---|
status | EmptyValue | The status to publish, which must be EmptyValue. |
value | undefined | The value to publish, which must be undefined. |
Returns
void
Call Signature
publish(
status,value):void
Defined in: src/sdk/data/DataBus.ts:113
Publishes a value and status update to this publisher's data item.
Parameters
| Parameter | Type | Description |
|---|---|---|
status | Normal | Failed | NoComputedValue | Testing | The status to publish. |
value | T | The value to publish. |
Returns
void
Call Signature
publish<
S>(status,value):void
Defined in: src/sdk/data/DataBus.ts:120
Publishes a value and status update to this publisher's data item.
Type Parameters
| Type Parameter | Description |
|---|---|
S extends DataItemStatus | The status to publish. |
Parameters
| Parameter | Type | Description |
|---|---|---|
status | S | The status to publish. |
value | S extends EmptyValue ? undefined : T | The value to publish. |
Returns
void
publishEmpty()
publishEmpty():
void
Defined in: src/sdk/data/DataBus.ts:126
Publishes an empty-value update to this publisher's data item. The data item's status will be set to DataItemStatus.EmptyValue.
Returns
void