Actions
Allows to register actions that can be reused throughout your code.
register(action, callback)
Section titled “register(action, callback)”Registers the action
actions.register('action-to-register', () => {})
action
Section titled “action”Type:
type action = string
The name of the action you want to register.
callback
Section titled “callback”Type:
type callback = (value) => {}
The callback to be executed on this action. The arguments for the callback are provided from the execute
method.
execute(action, value)
Section titled “execute(action, value)”Executes an action
action
Section titled “action”Type:
type action = string
The name of the action you want to execute.
Type:
type value = any
Provides a value to the callback.
remove(action)
Section titled “remove(action)”Removes the action.
action
Section titled “action”Type:
type action = string
The name of the action you want to remove.