(store: Store)
| 111 | } |
| 112 | |
| 113 | const devtoolsMiddleware = (store: Store) => (next: Function, args: any) => ( |
| 114 | action: Action |
| 115 | ) => { |
| 116 | let result = next(action); |
| 117 | subscribe(store, devtoolsMiddleware as { initialized?: boolean }); |
| 118 | getOrAddAction(action, () => next(action)); |
| 119 | const reduxAction: ReduxAction = { type: action.name, args: args }; |
| 120 | if (result && result.then) { |
| 121 | return result.then( |
| 122 | () => |
| 123 | devTools.instance && |
| 124 | devTools.instance.send(reduxAction, store.getState()) |
| 125 | ); |
| 126 | } |
| 127 | if (devTools.instance) { |
| 128 | devTools.instance.send(reduxAction, store.getState()); |
| 129 | } |
| 130 | return result; |
| 131 | }; |
| 132 | |
| 133 | if (typeof window === "object" && (<any>window).__REDUX_DEVTOOLS_EXTENSION__) { |
| 134 | connect = function(initialState: object, options: object) { |
nothing calls this directly
no test coverage detected