What I'm currently doing is:
export type Action =
{ type: 'FOO' }
| { type: 'BAR' }
export type Thunk = (dispatch: Dispatch, getState: GetState) => Action | Thunk
export type Dispatch = ReduxDispatch<Action> & (action: Thunk) => void
but if you dispatch directly on the store, that won't work without recreating store:
export type Store = ReduxStore<State, Action>
In general, my thunk solution seems to have other minor problems. Does anyone have a working library definition for redux-thunk? I can't find one anywhere.
The best example I've found so far are the ones used in Facebook's own F8 app here.
It's pretty similar to yours:
export type Dispatch = (action: Action | ThunkAction | PromiseAction | Array<Action>) => any;
export type GetState = () => Object;
export type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;
export type PromiseAction = Promise<Action>;
It's worked pretty well for me so far in my project, though I don't dispatch directly on the store anywhere.