Skip to content

Commit

Permalink
move to snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
mellson committed Dec 12, 2023
1 parent 091fcef commit bb76f0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/sky-core/src/actorFromStately.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export async function actorFromStately<T extends AnyStateMachine>(
case 'actor.start': {
// Start the actor with the initial value from Sky
actor = createActor(machine as any, {
state: skyEvent.persistedState,
snapshot: skyEvent.snapshot,
});

// Send all events from the actor to Sky except for events that originate from Sky
Expand Down
2 changes: 1 addition & 1 deletion packages/sky-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export type SkyServerSimulateEvent = SafeSkyEvent &
InternalSkyServerSimulateEvent;

type InternalSkyServerActorEvent =
| { type: 'actor.start'; persistedState: SnapshotFrom<AnyActorLogic> }
| { type: 'actor.start'; snapshot: SnapshotFrom<AnyActorLogic> }
| { type: 'actor.send'; event: AnyEventObject }
| { type: 'actor.stop'; event: AnyEventObject }
| { type: 'actor.error'; error: string };
Expand Down

0 comments on commit bb76f0f

Please sign in to comment.