For example, in the file: src/actions/expenses.ts
Let's say that I add an "alert" action creator to that file. And, alert is a thunk.
How could I dispatch alert from startAddExpense without raising a TypeScript error?
Is there a new type or interface that could be added to actions.ts?
When I add dispatch(alert()); to startAddExpense, I get the error:
`Argument of type '(dispatch: Dispatch, getState: () => CombinedState<{ foo: IFooReducer; bar: IBarReducer; }>) => Promise<...>' is not assignable to parameter of type 'AppActions'.
I've been experimenting with adding different types to AppActions, but haven't found the right recipe so far.
For example, in the file: src/actions/expenses.ts Let's say that I add an "alert" action creator to that file. And, alert is a thunk. How could I dispatch alert from startAddExpense without raising a TypeScript error? Is there a new type or interface that could be added to actions.ts?
When I add dispatch(alert()); to startAddExpense, I get the error: `Argument of type '(dispatch: Dispatch, getState: () => CombinedState<{ foo: IFooReducer; bar: IBarReducer; }>) => Promise<...>' is not assignable to parameter of type 'AppActions'.
I've been experimenting with adding different types to AppActions, but haven't found the right recipe so far.