Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/xstate/src/spawn.ts>Spawner

State machines and statecharts for the modern web.
Go to Latest
type alias Spawner
import { type Spawner } from "https://deno.land/x/xstate@xstate%405.0.0-beta.36/src/spawn.ts";
definition: IsLiteralString<TActor["src"]> extends true ? <TSrc extends TActor["src"]>(logic: TSrc, ...unnamed 1: SpawnOptions<TActor, TSrc>) => ActorRefFrom<(TActor & { src: TSrc; })["logic"]> : <TLogic extends AnyActorLogic | string>(src: TLogic, options?: { id?: string; systemId?: string; input?: unknown; syncSnapshot?: boolean; }) => TLogic extends string ? AnyActorRef : ActorRefFrom<TLogic>