Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xstate/src/StateMachine.ts>StateMachine#provide

State machines and statecharts for the modern web.
Go to Latest
method StateMachine.prototype.provide
import { StateMachine } from "https://deno.land/x/xstate@xstate%405.0.0-beta.13/src/StateMachine.ts";

Clones this state machine with the provided implementations and merges the context (if provided).

Parameters

implementations: InternalMachineImplementations<TContext, TEvent, TResolvedTypesMeta, true>

Options (actions, guards, actors, delays, context) to recursively merge with the existing options.

Returns

StateMachine<TContext, TEvent, TAction, TActorMap, AreAllImplementationsAssumedToBeProvided<TResolvedTypesMeta> extends false ? MarkAllImplementationsAsProvided<TResolvedTypesMeta> : TResolvedTypesMeta>

A new StateMachine instance with the provided implementations.