AngularFirebase / angular-electron

Angular + Electron
152 stars 106 forks source link

Property 'interval' does not exist on type 'typeof Observable'. #9

Open harshaldhone opened 3 years ago

harshaldhone commented 3 years ago

I am using angular 10 and facing this issue

harshaldhone commented 3 years ago

error TS2305: Module '"../../node_modules/rxjs/Observable"' has no exported member 'Observable'.

2 import { Observable } from 'rxjs/Observable';

unuaunco commented 3 years ago

Try to change this part:

import { Observable, interval as obInterval } from 'rxjs';
import { map, takeWhile, tap } from 'rxjs/operators';

...

  start(){
    let interval: any = obInterval(1000);

    interval
        .pipe(
            takeWhile((_: any) => !this.isFinished ),
            tap(() => this.current += 0.1)
        )
        .subscribe();
  }