Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor & remove unused
  • Loading branch information
ShMcK committed Jun 10, 2019
commit 9ba52b0b332ee0fa30bf4ca891d0e9ce32e64545
2 changes: 1 addition & 1 deletion src/editor/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ export const createCommands = ({ context, machine, storage, git, position }: Cre
},
[COMMANDS.RECEIVE_ACTION]: (action: string | CR.Action) => {
console.log('onReceiveAction', action)
machine.onReceive(action)
machine.send(action)
}
})
6 changes: 0 additions & 6 deletions src/state/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ class StateMachine {
this.service.stop()
}
send(action: string | CR.Action) {
console.log('machine.send')
console.log(action)
this.service.send(action)
}
onReceive(action: string | CR.Action) {
console.log(action)
this.service.send(action)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/state/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const machine = Machine<
states: {
LoadNext: {
id: 'tutorial-load-next',
// onEntry: () => send('LOAD_NEXT'),
// onEntry: [() => send('LOAD_NEXT')],
on: {
LOAD_NEXT: [
{
Expand Down
13 changes: 0 additions & 13 deletions src/state/message.ts

This file was deleted.

1 change: 0 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,4 @@ export interface StateMachine {
activate(): void
deactivate(): void
send(action: string | Action): void
onReceive(action: string | Action): void
}