Function: analyzeStructure()
@rxova/journey-core / analyzeStructure
function analyzeStructure(definition): DiagnosticsResult;Defined in: packages/core/src/diagnostics/diagnostics.helpers.ts:121
Structural analysis of a graph definition: unreachable steps, shadowed
transitions (an earlier unguarded candidate on the same (from, event)
always wins), cycles, and terminal-path existence. Completion is explicit in
this model, so terminal steps are reported as facts in the summary, not as
dead-end issues.
A plain function over the definition rather than a plugin over a machine. Nothing here needs a runtime — it is the definition that is being checked — so this runs in a test or a build step, before any machine exists. Linear journeys have no transition graph and so nothing to analyze.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition | { initial: string; steps: object; } |
definition.initial | string |
definition.steps | object |