import { Spawner } from "../spawn.js"; import type { ActionArgs, AnyEventObject, Assigner, EventObject, LowInfer, MachineContext, ParameterizedObject, PropertyAssigner, ProvidedActor, ActionFunction } from "../types.js"; export interface AssignArgs extends ActionArgs { spawn: Spawner; } export interface AssignAction { (args: ActionArgs, params: TParams): void; _out_TActor?: TActor; } /** * Updates the current context of the machine. * * @param assignment An object that represents the partial context to update, or a * function that returns an object that represents the partial context to update. * * @example ```ts import { createMachine, assign } from 'xstate'; const countMachine = createMachine({ context: { count: 0, message: '' }, on: { inc: { actions: assign({ count: ({ context }) => context.count + 1 }) }, updateMessage: { actions: assign(({ context, event }) => { return { message: event.message.trim() } }) } } }); ``` */ export declare function assign(assignment: Assigner, TExpressionEvent, TParams, TEvent, TActor> | PropertyAssigner, TExpressionEvent, TParams, TEvent, TActor>): ActionFunction;