GraphReFlyTS

API Reference

eventFlowProjection()

Creates an event flow projection.

Import

import { eventFlowProjection } from "@graphrefly/ts/patterns/event-flow";

Signature

function eventFlowProjection(
	graph: Graph,
	flowOrRecords: EventFlowBundle<TPayload> | Node<EventFlowRecord<TPayload>>,
	opts: EventFlowProjectionOptions<TState, TPayload>,
): EventFlowProjectionBundle<TState>

Parameters

ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
flowOrRecordsEventFlowBundle<TPayload> | Node<EventFlowRecord<TPayload>>flow or records value used by the helper.
optsEventFlowProjectionOptions<TState, TPayload>Options that configure the helper.

Returns

The event flow projection result.

Example

import { eventFlowProjection } from "@graphrefly/ts/patterns/event-flow";

Source

packages/ts/src/patterns/event-flow.ts