Skip to content

Type Editor


Type Editor / @type-editor/state / types/Command / DispatchFunction

Type Alias: DispatchFunction()

ts
type DispatchFunction = (transaction) => void;

Defined in: state/src/types/Command.ts:16

Commands are functions that take a state and a an optional transaction dispatch function and...

  • determine whether they apply to this state
  • if not, return false
  • if dispatch was passed, perform their effect, possibly by passing a transaction to dispatch
  • return true

In some cases, the editor view is passed as a third argument.

Parameters

ParameterType
transactionPmTransaction

Returns

void