Skip to content

Commit

Permalink
cross-reference state and getPersistedState
Browse files Browse the repository at this point in the history
  • Loading branch information
audionerd committed Oct 31, 2023
1 parent ded2b28 commit 010d442
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ export class Actor<TLogic extends AnyActorLogic>
*
* Note that the persisted state is not the same as the snapshot from `actor.getSnapshot()`. Persisted state represents the internal state of the actor, while snapshots represent the actor's last emitted value.
*
* Can be restored with {@link ActorOptions.state}
*
* @see https://stately.ai/docs/persistence
*/
public getPersistedState(): Snapshot<unknown> {
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,8 @@ export interface ActorOptions<TLogic extends AnyActorLogic> {
* Actions from machine actors will not be re-executed, because they are assumed to have been already executed.
* However, invocations will be restarted, and spawned actors will be restored recursively.
*
* Can be generated with {@link Actor.getPersistedState}.
*
* @see https://stately.ai/docs/persistence
*/
// state?:
Expand Down

0 comments on commit 010d442

Please sign in to comment.