UNPKG

1.23 kBTypeScriptView Raw
1import { ActionArgs, AnyActorRef, EventObject, MachineContext, ParameterizedObject } from "../types.js";
2type ResolvableActorRef<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject> = string | AnyActorRef | ((args: ActionArgs<TContext, TExpressionEvent, TEvent>, params: TParams) => AnyActorRef | string);
3export interface StopAction<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject> {
4 (args: ActionArgs<TContext, TExpressionEvent, TEvent>, params: TParams): void;
5}
6/**
7 * Stops a child actor.
8 *
9 * @param actorRef The actor to stop.
10 */
11export declare function stopChild<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject>(actorRef: ResolvableActorRef<TContext, TExpressionEvent, TParams, TEvent>): StopAction<TContext, TExpressionEvent, TParams, TEvent>;
12/**
13 * Stops a child actor.
14 *
15 * @deprecated Use `stopChild(...)` instead
16 * @alias
17 */
18export declare const stop: typeof stopChild;
19export {};
20
\No newline at end of file