import { ThunkAction } from 'redux-thunk';
import { createAction } from 'redux-ts-utils';
type State = {}
const someAction = createAction<void>('SOME_ACTION');
export const sampleThunk = (): ThunkAction<Promise<void>, State, void> => async (dispatch, getState) => {
await Promise.resolve();
dispatch(someAction());
};
Produces the following error:
TS2345: Argument of type 'TsAction<void, void>' is not assignable to parameter of type 'Action'.
Property 'type' is missing in type 'TsAction<void, void>' but required in type 'Action'.
It looks like TsAction doesn't expose it's type property which is causing issues with redux's internal Action type.
Produces the following error:
It looks like TsAction doesn't expose it's
type
property which is causing issues with redux's internalAction
type.