Skip to content
PACKAGES

toTopic()

Creates a to topic.

import { toTopic } from "@graphrefly/ts/messaging";
function toTopic(
graph: Graph,
source: Node<T>,
bus: MessageBus<TTopic>,
topic: TTopic | string,
opts: ToTopicOptions = {},
): ToTopicBundle<T>
ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
sourceNode<T>Source node that provides graph-visible input.
busMessageBus<TTopic>bus value used by the helper.
topicTTopic | stringtopic value used by the helper.
optsToTopicOptionsOptions that configure the helper.

The to topic result.

import { toTopic } from "@graphrefly/ts/messaging";

packages/ts/src/messaging/index.ts