Type Alias: JourneyRuntimeOptions<TPlugins, TStepId>
@rxova/journey-react / JourneyRuntimeOptions
type JourneyRuntimeOptions<TPlugins, TStepId> = object;Defined in: core/src/core/types.ts:568
Runtime options shared by linear and graph journeys.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TPlugins extends readonly AnyJourneyPlugin[] | readonly [] |
TStepId extends string | string |
Properties
Section titled “Properties”autoStart?
Section titled “autoStart?”optional autoStart?: boolean;Defined in: core/src/core/types.ts:591
Defaults to true: creating a journey starts it, so the common case needs
no second call.
The trade this makes, stated plainly because it cannot be worked around:
starting happens inside the constructor and the initial entry commits
synchronously, so the first stepEnter has already fired by the time the
factory returns. A subscriber attached afterwards cannot see it.
Pass false when that first event matters — it is the subscribe-then-start
order, and saying so out loud is better than a default that silently
assumes it:
const machine = createLinearJourney(definition, { autoStart: false });machine.subscriptions.subscribeEvent("stepEnter", onEnter);machine.controls.start();defaultTimeoutMs?
Section titled “defaultTimeoutMs?”optional defaultTimeoutMs?: number;Defined in: core/src/core/types.ts:608
Applied to navigation work and every async hook invocation. Work timeouts block movement; post-commit hook timeouts surface as step errors.
onListenerError?
Section titled “onListenerError?”optional onListenerError?: (error) => void;Defined in: core/src/core/types.ts:614
Called when a subscriber (selector or event listener) throws. Listener
failures are always isolated — this hook only routes the report. Defaults
to a console.error; a throwing reporter falls back to that default.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
error | unknown |
Returns
Section titled “Returns”void
persist?
Section titled “persist?”optional persist?: JourneyPersistOption;Defined in: core/src/core/types.ts:603
Expands into the persistence plugin, prepended to plugins. Combining it
with an explicit persistence plugin fails as a duplicate plugin name.
plugins?
Section titled “plugins?”optional plugins?: TPlugins;Defined in: core/src/core/types.ts:615
startAt?
Section titled “startAt?”optional startAt?: TStepId;Defined in: core/src/core/types.ts:598
Start (and restart) directly at this step instead of the first/initial
one: only the target’s onEnter fires, earlier steps are neither entered
nor visited, and the timeline begins as [startAt]. An unknown id throws
at creation.