MCPcopy
hub / github.com/statelyai/xstate / isMachineSnapshot

Function isMachineSnapshot

packages/core/src/State.ts:40–47  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

38 };
39
40export function isMachineSnapshot(value: unknown): value is AnyMachineSnapshot {
41 return (
42 !!value &&
43 typeof value === 'object' &&
44 'machine' in value &&
45 'value' in value
46 );
47}
48
49interface MachineSnapshotBase<
50 TContext extends MachineContext,

Callers 5

simplifyEventsFunction · 0.90
toStateValueFunction · 0.90
TestModelClass · 0.90
getPathSnapshotFunction · 0.90
graph.test.tsFile · 0.90

Calls

no outgoing calls

Tested by 2

simplifyEventsFunction · 0.72
getPathSnapshotFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…