API Reference
messageBus()
Creates a message bus.
Import
import { messageBus } from "@graphrefly/ts/messaging";
Signature
function messageBus(
graph: Graph,
opts: MessageBusOptions<TTopic> = {},
): MessageBus<TTopic>
Parameters
| Parameter | Type | Description |
|---|---|---|
graph | Graph | Graph that owns the created nodes or projector. |
opts | MessageBusOptions<TTopic> | Options that configure the helper. |
Returns
The message bus result.
Example
import { messageBus } from "@graphrefly/ts/messaging";
Source
packages/ts/src/messaging/index.ts