title: How to make actions known when using ngrx-effects oftype operator
body: <p>My code base is heavily using ngrx-effects and we use <code>ofType</code> like this:</p>
  
  <pre><code>  @Effect()
    someEffect$ = this.actions$
      .ofType&lt;LoginAction&gt;(UserActions.LOGIN)
    . . .
  </code></pre>
  
  <p>I recall reading some time back--but cannot find the reference--that ngrx effects no longer needs both the generic type instantiator and the action argument. Checking the docs, I find this example on the <a href="https://ngrx.io/guide/migration/v7#oftype-removal" rel="nofollow noreferrer">v7 Update Guide</a>:</p>
  
  <pre><code>  @Effect()
    someEffect$ = this.actions$
      .ofType(UserActions.LOGIN)
    . . .
  </code></pre>
  
  <p>That is, it is using the <strong>non</strong>-generic flavor of <code>ofType</code>.</p>
  
  <p>Now on the <a href="https://ngrx.io/api/effects/ofType" rel="nofollow noreferrer">ofType docs page</a> itself, it seems to affirm my recollection that both are not needed, stating:</p>
  
  <blockquote>
    <p>For backwards compatibility, when one passes a single type argument
    <code>ofType&lt;T&gt;('something')</code> the result is an <code>Observable&lt;T&gt;</code>. Note, that T
    completely overrides any possible inference from 'something'.
    Unfortunately, for unknown 'actions: Actions' these types will produce
    'Observable'. In such cases one has to manually set the generic type
    like actions.ofType('add').</p>
  </blockquote>
  
  <p>Now here's my actual bit of code:</p>
  
  <pre><code>    @Effect()
      toggleTokenFailure$ = this.actions$.pipe(  
        ofType&lt;ToggleTokenActiveFailure&gt;(ApiTokenActionTypes.TOGGLE_FAILURE),
        map(({ payload: { error } }) =&gt; new CreateNotification({
        . . .
  
  </code></pre>
  
  <p>If I change the <code>ofType</code> line to this:</p>
  
  <pre><code>    ofType(ApiTokenActionTypes.TOGGLE_FAILURE),
  </code></pre>
  
  <p>the code still works, but I lose my typing on <code>payload</code> (it becomes <code>any</code>). With the original line, the type of <code>payload</code> was <code>HttpErrorResponse</code> (because that is the type of <code>ToggleTokenActiveFailure.payload</code>).</p>
  
  <p>So, per the docs I quoted above, why is my action "unknown", or more to the point, how do I make it known?</p>