import { EventObject, MachineContext, ActionArgs, ParameterizedObject } from "../types.js"; type ResolvableSendId = string | ((args: ActionArgs, params: TParams) => string); export interface CancelAction { (args: ActionArgs, params: TParams): void; } /** * Cancels a delayed `sendTo(...)` action that is waiting to be executed. The canceled `sendTo(...)` action * will not send its event or execute, unless the `delay` has already elapsed before `cancel(...)` is called. * * @param sendId The `id` of the `sendTo(...)` action to cancel. * * @example ```ts import { createMachine, sendTo, cancel } from 'xstate'; const machine = createMachine({ // ... on: { sendEvent: { actions: sendTo('some-actor', { type: 'someEvent' }, { id: 'some-id', delay: 1000 }) }, cancelEvent: { actions: cancel('some-id') } } }); ``` */ export declare function cancel(sendId: ResolvableSendId): CancelAction; export {};