title: Property 'pipe' does not exist on type 'void' Angular 6
body: <p>I don't understand the cause of the problem.
  my code from <code>Service</code> File and i get Error</p>
  <ol>
  <li>Property 'pipe' does not exist on type 'void'.</li>
  <li>Property '$key' does not exist on type '{}'.</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/UABeo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UABeo.png" alt="enter image description here" /></a></p>
  <pre><code>import { Injectable } from '@angular/core';
  import { AngularFireDatabase, AngularFireList } from '@angular/fire/database';
  import { switchMap } from 'rxjs/operators';
  import { Observable } from 'rxjs';
  @Injectable({
    providedIn: 'root'
  })
  export class CoursesService {
  
    constructor(private af: AngularFireDatabase) { }
  
    findAllCourses(): AngularFireList&lt;any&gt; {
      return this.af.list('courses');
    }
  
    findCourseDtl(coursUrl:string){
     this.af.list('courses', ref =&gt; ref.orderByChild('url').equalTo(coursUrl)).valueChanges()
    }
  
    findLessonsForCours(coursUrl:string): Observable&lt;any&gt;{
      return this.findCourseDtl(coursUrl)
     .pipe(switchMap(course =&gt; this.af.list('lessonsPerCourse/'+ course.$key ).valueChanges()));
  
  
  }
  
  }
  </code></pre>