Property 'run' does not exist on type 'EpicMiddleware'
Property 'run' does not exist on type 'EpicMiddleware<Action<any>, {}, any, Action<any>>'
I am encountering this ts error when I am trying to createEpicMiddleware dos. Not sure what I am doing wrong. I have been working on this since the morning, any help would be appreciated.
const epicMiddleware = createEpicMiddleware({
dependencies: { ... }
});
let middleware: Middleware = ;
middleware.push(epicMiddleware);
...
export const configureStore = (initialState: object): Store<IStore> => {
const store = createStore(
rootReducer,
initialState,
applyMiddleware(...middleware)
);
epicMiddleware.run(rootEpic);
return store;
};
This is the error I am getting,
Property 'run' does not exist on type 'EpicMiddleware<Action<any>, {}, any, Action<any>>'.
Property 'run' does not exist on type 'EpicMiddleware<Action<any>, {}, any, Action<any>>'.
When I change the type of epicMiddleware
to any
, then it throws a runtime error, You must provide a root Epic to createEpicMiddleware
epicMiddleware
any
You must provide a root Epic to createEpicMiddleware
P.S. I am using the latest version of redux-observable
(1.0.0)
redux-observable
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.