title: RxJs6: OperatorFunction vs MonoTypeOperatorFunction
body: <p>I have the following code:</p>
  
  <pre><code>export class EventsChainComponent { 
      eventSubscriber:Subscription;
  
      constructor (protected eventService: EventService) {}
  
  
      public registerComponentsEvent(event:any) {
          // getOnEvent signature
          // (method) EventService.getOnEvent(): Observable&lt;FormEvent&gt;
          this.eventSubscriber = this.eventService.getOnEvent()
              .pipe(filter((formEvent: FormEvent) =&gt; {return formEvent.key == event.event}))
              .subscribe((formEvent: FormEvent) =&gt; {
                    ..........
              });
      }
  </code></pre>
  
  <p>When I compile, the compiler returns the following error:</p>
  
  <blockquote>
    <p>Argument of type 'MonoTypeOperatorFunction' is not assignable to parameter of type 'OperatorFunction'.</p>
  </blockquote>
  
  <p>So, I search a little bit and I found the <code>RxJs6</code> operator filter API:</p>
  
  <pre><code>export declare function filter&lt;T, S extends T&gt;(predicate: (value: T, index: number) =&gt; value is S, thisArg?: any): OperatorFunction&lt;T, S&gt;;
  export declare function filter&lt;T&gt;(predicate: (value: T, index: number) =&gt; boolean, thisArg?: any): MonoTypeOperatorFunction&lt;T&gt;;
  </code></pre>
  
  <p>As you can see, the filter as 2 overloads methods, one returning <code>OperatorFunction</code> and another <code>MonoTypeOperatorFunction</code>.</p>
  
  <p>Any one can tell me the difference between this 2 types? And any one knows how can I solve this error?</p>
  
  <p>Note: The <code>FormEvent</code> class was created by me, and both <code>EventService</code> and <code>EventsChainComponent</code> has the same import that reference to the same class.</p>