title: Display Clock with Angular 6 and RxJs 6
body: <p>How do I display a clock using rxjs 6 using Angular 6. The below code worked for angular 5. But now I am getting an error saying that interval is not of type Observable.</p>
  
  <pre><code>@Injectable()
  export class MailService {
  
    private clock: Observable&lt;Date&gt;;
  
  
    constructor(private http : HttpClient) { 
      this.clock = Observable.interval(1000).map(tick =&gt; new Date()).share();
    }
  
    getClock(): Observable&lt;Date&gt; {
      return this.clock;
    }
  
  }
  </code></pre>