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
dispatchwas passed, perform their effect, possibly by passing a transaction todispatch - return true
In some cases, the editor view is passed as a third argument.
Parameters
| Parameter | Type |
|---|---|
transaction | PmTransaction |
Returns
void