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