Function withPersistableActor

  • Helper function for managing the lifecycle of a PersistableActor. Facilitates the use of PersistableActor by handling initialization, action execution, state persistence, and cleanup in an organized way.

    Type Parameters

    • TLogic extends AnyActorLogic

    • TActor extends Actor<TLogic>

    Parameters

    • params: PersistableActorInput<TLogic, TActor>

      Parameters for creating the PersistableActor.

    • callback: ((actor) => Promise<void>)

      An asynchronous callback function for performing actions with the actor instance.

        • (actor): Promise<void>
        • Parameters

          Returns Promise<void>

    Returns Promise<void>

    Throws

    • Propagates any errors that occur during the actor's lifecycle.

Generated using TypeDoc