Home Reference Source

src/jg/commands.js

  1. export default {
  2. runAction: {
  3. name: 'runAction',
  4. create: (name, args) => {
  5. return {'type': 'runAction', name, args};
  6. },
  7. },
  8. write: {
  9. name: 'write',
  10. create: (itemId, snippetId) => {
  11. return {'type': 'write', itemId, snippetId};
  12. },
  13. },
  14. replace: {
  15. name: 'replace',
  16. create: (itemId, snippetId, elId) => {
  17. return {'type': 'replace', itemId, snippetId, elId};
  18. },
  19. },
  20. goToSituation: {
  21. name: 'goToSituation',
  22. create: (id) => {
  23. return {'type': 'goToSituation', id};
  24. },
  25. },
  26. resetGame: {
  27. name: 'resetGame',
  28. create: () => ({'type': 'resetGame'}),
  29. },
  30. };