Rxova
Skip to content

Type Alias: AnyJourneyMachine

@rxova/journey-react


@rxova/journey-react / AnyJourneyMachine

type AnyJourneyMachine = object;

Defined in: react/src/react.types.ts:38

The structural surface every core create*Journey machine satisfies. Use it to type a caller-owned machine held outside a bundle — in a store, a prop, or a useState initializer — and let SnapshotOf/StepIdOf/ ContextOf infer the concrete types from whichever machine you pass.

Method syntax (not arrow-property syntax) is deliberate: method signatures compare parameters bivariantly, so concretely-typed machines satisfy this structural surface without variance gymnastics.

subscriptions: object;

Defined in: react/src/react.types.ts:40

subscribe(listener): () => void;
ParameterType
listener() => void

() => void

subscribeEvent(event, listener): () => void;
ParameterType
eventJourneySubscriptionEvent
listener(payload) => void

() => void

dispose(): void;

Defined in: react/src/react.types.ts:47

void


getSnapshot(): JourneySnapshot;

Defined in: react/src/react.types.ts:39

JourneySnapshot