GraphReFlyTS

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

ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
optsMessageBusOptions<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