const Observable = rxjs.Observable; const observable = new Observable(function(observer){ observer.next('hanw') }) const observer = { next: function(value){ console.log(value) } } observable.subscribe(observer)