{"action":"created","issue":{"url":"https://api.github.com/repos/redux-observable/redux-observable/issues/564","repository_url":"https://api.github.com/repos/redux-observable/redux-observable","labels_url":"https://api.github.com/repos/redux-observable/redux-observable/issues/564/labels{/name}","comments_url":"https://api.github.com/repos/redux-observable/redux-observable/issues/564/comments","events_url":"https://api.github.com/repos/redux-observable/redux-observable/issues/564/events","html_url":"https://github.com/redux-observable/redux-observable/issues/564","id":354012262,"node_id":"MDU6SXNzdWUzNTQwMTIyNjI=","number":564,"title":"createEpicMiddleware typescript definition should set state as any instead of void","user":{"login":"duvet86","id":5604548,"node_id":"MDQ6VXNlcjU2MDQ1NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/5604548?v=4","gravatar_id":"","url":"https://api.github.com/users/duvet86","html_url":"https://github.com/duvet86","followers_url":"https://api.github.com/users/duvet86/followers","following_url":"https://api.github.com/users/duvet86/following{/other_user}","gists_url":"https://api.github.com/users/duvet86/gists{/gist_id}","starred_url":"https://api.github.com/users/duvet86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duvet86/subscriptions","organizations_url":"https://api.github.com/users/duvet86/orgs","repos_url":"https://api.github.com/users/duvet86/repos","events_url":"https://api.github.com/users/duvet86/events{/privacy}","received_events_url":"https://api.github.com/users/duvet86/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-25T13:28:21Z","updated_at":"2018-08-25T16:35:41Z","closed_at":null,"author_association":"NONE","body":"I'm using redux-observable with typescript and I defined an Epic that requires the state$:\r\n```\r\nconst saveGraphEpic = (\r\n  action$: ActionsObservable<GraphSaveChangesAction>,\r\n  state$: StateObservable<IState>\r\n) =>\r\n  action$.pipe(\r\n    ofType(GraphSaveActionTypes.GRAPH_SAVE_REQUEST),\r\n    mergeMap(() => {\r\n      const {\r\n        sessionReducer: {\r\n          session: { TenantId, SessionId, QueryGraphId },\r\n          graph\r\n        }\r\n      } = state$.value;\r\n\r\n      return saveGraphObs(TenantId, SessionId, QueryGraphId, graph, true).pipe(\r\n        map(() => graphSaveChangesSuccess()),\r\n        catchError(error => handleException(error))\r\n      );\r\n    })\r\n  );\r\n```\r\n\r\nBut the run method of the **createEpicMiddleware** throws an error:\r\n![image](https://user-images.githubusercontent.com/5604548/44618474-26481e00-a8a9-11e8-9ab0-f5ee34585004.png)\r\n\r\nI solved the issue adding parameters to the middleware, in particular the RootState one:\r\n`const epicMiddleware = createEpicMiddleware<ActionInput, ActionOutput, RootState>();`\r\n\r\nAnd this is the typescript definition of createEpicMiddleware: \r\n`export declare function createEpicMiddleware<T extends Action, O extends T = T, S = void, D = any>(options?: Options<D>): EpicMiddleware<T, O, S, D>;`\r\n\r\nShouldn't S = any ?\r\n"},"comment":{"url":"https://api.github.com/repos/redux-observable/redux-observable/issues/comments/415981189","html_url":"https://github.com/redux-observable/redux-observable/issues/564#issuecomment-415981189","issue_url":"https://api.github.com/repos/redux-observable/redux-observable/issues/564","id":415981189,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTk4MTE4OQ==","user":{"login":"jayphelps","id":762949,"node_id":"MDQ6VXNlcjc2Mjk0OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/762949?v=4","gravatar_id":"","url":"https://api.github.com/users/jayphelps","html_url":"https://github.com/jayphelps","followers_url":"https://api.github.com/users/jayphelps/followers","following_url":"https://api.github.com/users/jayphelps/following{/other_user}","gists_url":"https://api.github.com/users/jayphelps/gists{/gist_id}","starred_url":"https://api.github.com/users/jayphelps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayphelps/subscriptions","organizations_url":"https://api.github.com/users/jayphelps/orgs","repos_url":"https://api.github.com/users/jayphelps/repos","events_url":"https://api.github.com/users/jayphelps/events{/privacy}","received_events_url":"https://api.github.com/users/jayphelps/received_events","type":"User","site_admin":false},"created_at":"2018-08-25T16:35:41Z","updated_at":"2018-08-25T16:35:41Z","author_association":"MEMBER","body":"Any opinion @ajcrites?\r\n\r\nOriginal PR #473"}}
{"actor":{"display_login":"jayphelps"}}