import { from , asapScheduler , Observable } from 'rxjs' ; import { map } from 'rxjs/operators' ; const iterable = function * ( ) { yield 1 ; yield 2 ; yield 3 ; } ; const iterable$ = from ( iterable ( ) , asapScheduler ) ; iterable$ . subscribe ( { next : x => console . log ( `Next: ${ x }` ) , complete : ( ) => console . log ( 'Complete' ) } ) ;