Skip to content

execute

execute(event): object

Defined in: behavior.types.action.ts:73

Directly executes an event, bypassing all Behavior matching.

Use execute when you want to perform an action without triggering any Behaviors. The event is executed immediately as a direct operation.

SyntheticBehaviorEvent

object

event: SyntheticBehaviorEvent

type: "execute"

defineBehavior({
on: 'insert.text',
guard: ({event}) => event.text === 'a',
actions: [() => [execute({type: 'insert.text', text: 'b'})]],
})