UNPKG

actor-kit

Version:

Actor Kit is a library for running state machines in Cloudflare Workers, leveraging XState for robust state management. It provides a framework for managing the logic, lifecycle, persistence, synchronization, and access control of actors in a distributed

13 lines 638 B
import { ActorKitClient, AnyActorKitStateMachine, CallerSnapshotFrom } from "./types"; export type ActorKitClientProps<TMachine extends AnyActorKitStateMachine> = { host: string; actorType: string; actorId: string; checksum: string; accessToken: string; initialSnapshot: CallerSnapshotFrom<TMachine>; onStateChange?: (newState: CallerSnapshotFrom<TMachine>) => void; onError?: (error: Error) => void; }; export declare function createActorKitClient<TMachine extends AnyActorKitStateMachine>(props: ActorKitClientProps<TMachine>): ActorKitClient<TMachine>; //# sourceMappingURL=createActorKitClient.d.ts.map