title: Redux Observable Action with payload types don't match. But without payload its working
body: <p><a href="https://i.stack.imgur.com/1idGW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1idGW.png" alt="enter image description here"></a></p>
  
  <p>The code is as follows</p>
  
  <pre><code>import { Action } from "redux";
  import { ActionsObservable, ofType, combineEpics } from 'redux-observable'
  import { map } from 'rxjs/operators'
  
  export enum ActionTypes {
      One = 'ACTION_ONE',
      Two = 'ACTION_TWO'
  }
  
  export interface One extends Action {
      type: ActionTypes.One
      //commnent out next line to remove error
      myStr: string
  }
  
  export const doOne = (myStr: string): One =&gt; ({ 
      type: ActionTypes.One,
      //comment out next line to remove error
      myStr 
  })
  
  export interface Two extends Action {
      type: ActionTypes.Two
      myBool: boolean
  }
  
  export const doTwo = (myBool: boolean): Two =&gt; ({ type: ActionTypes.Two, myBool })
  
  export type Actions = One | Two
  
  export const epic = (action$: ActionsObservable&lt;Actions&gt;) =&gt; 
      action$.pipe(
          ofType&lt;Actions, One&gt;(ActionTypes.One),
          map((action: any) =&gt; ({
              type: ActionTypes.Two,
              myBool: true
          }))
      )
  
  export const rootEpic = combineEpics(epic)
  </code></pre>
  
  <p>Also how I generate the store</p>
  
  <pre><code>import { createEpicMiddleware } from "redux-observable"
  import { createStore, applyMiddleware } from "redux"
  import { reducer } from "./reducer"
  import { rootEpic } from "./epic"
  
  export const configStore = () =&gt; {
  
      const epicMiddleware = createEpicMiddleware()
  
      const store = createStore(reducer, applyMiddleware(epicMiddleware))
  
      epicMiddleware.run(rootEpic)
  
      return store
  }
  </code></pre>
  
  <p>I have spent last 4 hours trying to add payload to action but with every possible filter solution it fails. I tried asking for help on redux observable github section and their chat room. I also googled for simple example that is strictly typed. Didn't find any solution.</p>