Property 'switchMap' does not exist on type 'Observable<User>' : <p>I have been getting the following error message when trying to apply the switchMap operator to my Observable:</p>

<blockquote>
  <p>Property 'switchMap' does not exist on type 'Observable'.</p>
</blockquote>

<p>I'm currently using rxjs version 5.5.2, and in my component, I have it imported like so:</p>

<pre><code>import 'rxjs/operator/switchMap';
</code></pre>

<p>However, I still get a compilation error. I have looked at similar questions and have not found a proper solution to this, any suggestions on what could be the issue here?</p>

<pre><code>get appUser$() : Observable&lt;AppUser&gt; {
  return this.user$
    .switchMap(user =&gt; {
      if (user) return this.userService.get(user.uid);

      return Observable.of(null);
    });    
}
</code></pre>

<p>Image: 
<a href="https://i.stack.imgur.com/nhYB8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nhYB8.png" alt="enter image description here"></a></p>
