Type Alias: AnyJourneyMachine
@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.
Properties
Section titled “Properties”subscriptions
Section titled “subscriptions”subscriptions: object;Defined in: react/src/react.types.ts:40
subscribe()
Section titled “subscribe()”subscribe(listener): () => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
listener | () => void |
Returns
Section titled “Returns”() => void
subscribeEvent()
Section titled “subscribeEvent()”subscribeEvent(event, listener): () => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
event | JourneySubscriptionEvent |
listener | (payload) => void |
Returns
Section titled “Returns”() => void
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose(): void;Defined in: react/src/react.types.ts:47
Returns
Section titled “Returns”void
getSnapshot()
Section titled “getSnapshot()”getSnapshot(): JourneySnapshot;Defined in: react/src/react.types.ts:39