title: Property 'of' does not exist on type 'typeof Observable'.ts(2339)
body: <pre><code>import { Injectable } from '@angular/core';
  import { Book } from './book';
  import { Observable } from 'rxjs';
  import { of } from 'rxjs';
  
  
  
  
  @Injectable({
    providedIn: 'root'
  })
  export class BookService {
  
    constructor() { }
  
  
    BOOKS : Book[]=[
      
      {&quot;id&quot;: 1, &quot;name&quot; : &quot;JavaScript&quot;,  &quot;price&quot; :&quot;100&quot;, &quot;description&quot;: &quot;javscript&quot;},
      {&quot;id&quot;: 2, &quot;name&quot; : &quot;Angualr&quot;,  &quot;price&quot; :&quot;200&quot;, &quot;description&quot;: &quot;Angualr&quot;},
      {&quot;id&quot;: 3, &quot;name&quot; : &quot;Sql server&quot;,  &quot;price&quot; :&quot;3000&quot;, &quot;description&quot;: &quot;Sql server&quot;},
      {&quot;id&quot;: 4, &quot;name&quot; : &quot;Typescript&quot;,  &quot;price&quot; :&quot;5000&quot;, &quot;description&quot;: &quot;Typescript&quot;},
      
    ]
  
  
    getBooks(): Observable&lt;Book[]&gt;{
      return Observable.of(this.BOOKS);
    }
  }
  </code></pre>
  <p>Property 'of' does not exist on type 'typeof Observable'.ts(2339)</p>
  <p>i tried both import statement still it giving the</p>
  <pre><code>import { of } from 'rxjs';
  import 'rxjs/add/observable/of';
  </code></pre>
  <p>Property 'of' does not exist on type 'typeof Observable'.ts(2339)
  Property 'of' does not exist on type 'typeof Observable'.ts(2339)
  Property 'of' does not exist on type 'typeof Observable'.ts(2339)</p>