Interface: Publisher<E>
An interface that describes an event publisher.
Type parameters
Name |
---|
E |
Methods
pub
▸ pub<K
>(topic
, data
, sync?
, isCached?
): void
Publishes an event with data to a topic.
Type parameters
Name | Type |
---|---|
K | extends string | number | symbol |
Parameters
Name | Type | Description |
---|---|---|
topic | K | The topic to publish to. |
data | E [K ] | The data to publish. |
sync? | boolean | Whether or not to sync the data on the bus. |
isCached? | boolean | Whether or not this event should be cached for retrieval. |
Returns
void
Defined in
src/sdk/data/EventBus.ts:63