I have the following code inside the constructor of my Angular2 component class:
var observable = Observable.create(function (observer) {
observer.next(1);
observer.next(2);
observer.next(3);
observer.complete();
}).observeOn(Scheduler.async);
I imports include the following:
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/observeOn';
import { Scheduler } from 'rxjs/Scheduler';
import 'rxjs/scheduler/async';
I tried the following import as well instead of the last import above:
import { async } from 'rxjs/scheduler/async';
I have the following error message while building my project using Angulat CLI:
Property 'async' does not exist on type 'typeof Scheduler'
What am I missing?