Skip to content

Commit acc9ee4

Browse files
feat(overmind): addFlushListener
1 parent 99b1eaa commit acc9ee4

File tree

1 file changed

+4
-0
lines changed
  • packages/node_modules/overmind/src

1 file changed

+4
-0
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
IMutation,
88
VALUE,
99
IMutationCallback,
10+
IFlushCallback,
1011
} from 'proxy-state-tree'
1112
import { Derived } from './derived'
1213
import { Devtools, Message, safeValue, safeValues } from './Devtools'
@@ -631,6 +632,9 @@ export class Overmind<Config extends Configuration> implements Configuration {
631632
addMutationListener = (cb: IMutationCallback) => {
632633
return this.proxyStateTree.onMutation(cb)
633634
}
635+
addFlushListener = (cb: IFlushCallback) => {
636+
return this.proxyStateTree.onFlush(cb)
637+
}
634638
}
635639

636640
/*

0 commit comments

Comments
 (0)