Skip to content

Type Alias: MachineGraph

API / @xmachines/play-router / MachineGraph

type MachineGraph = Graph<MachineNodeData, MachineEdgeData>;

Defined in: machine-to-graph.ts:19

The typed Graph of @statelyai/graph that represents a state machine. It gives you the queries of the hierarchy, the algorithms of a walk, and the tests of the reachability.

Example

import { getChildren, getSuccessors, hasPath } from "@statelyai/graph";
const graph: MachineGraph = machineToGraph(machine);
const children = getChildren(graph, "myMachine");