Type Definitions
PubstConfig
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
logger |
Object |
<optional> |
Logger to send warning messages to. |
showWarnings |
boolean |
<optional> |
If logger isn't provided, switches between ConsoleLogger and SilentLogger. |
store |
Object |
<optional> |
A store implementation for persisting topic values. |
topics |
Array.<TopicConfig> |
<optional> |
An array of topic configurations. |
SubscriptionConfig
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
handler |
function | The handler to call when the topic is updated. | ||
default |
* |
<optional> |
Default value for this subscription. | |
doPrime |
boolean |
<optional> |
true | Should the handler be primed with the last value? |
allowRepeats |
boolean |
<optional> |
false | Should the handler be called when the value doesn't change? |
TopicConfig
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string | The name of the topic (REQUIRED). | ||
default |
* |
<optional> |
The default value presented to subscribers when the topic is undefined or null. | |
eventOnly |
boolean |
<optional> |
false | Set to true if this topic will not have payload data. |
doPrime |
boolean |
<optional> |
true | Should new subscribers automatically receive the last published value? |
allowRepeats |
boolean |
<optional> |
false | Alert subscribers of all publish events, even if unchanged. |
storeConfig |
Object |
<optional> |
{} | Store-specific configuration passed to the store's registerTopic method. |