createActor() function​
Creates a new ActorRef
instance for the given machine with the provided options, if any.
Signature:
export declare function createActor<TMachine extends AnyStateMachine>(machine: AreAllImplementationsAssumedToBeProvided<TMachine['__TResolvedTypesMeta']> extends true ? TMachine : MissingImplementationsError<TMachine['__TResolvedTypesMeta']>, options?: ActorOptions<TMachine>): Actor<TMachine>;
Parameters​
Parameter | Type | Description |
---|---|---|
machine | AreAllImplementationsAssumedToBeProvided<TMachine['__TResolvedTypesMeta']> extends true ? TMachine : MissingImplementationsError<TMachine['__TResolvedTypesMeta']> | The machine to create an actor from |
options | ActorOptions<TMachine> | (Optional) ActorRef options |
Returns:
Actor<TMachine>