RXJS 5 .subscribe() without arguments

.subscribe() actually doesn't require any parameters, it will just create an emptyObserver if none are given, which should work just as well.

It is possible though, that there are issues related to this in some of the 5.0.0-beta versions - in case you are using one of those versions, you should update to a more stable release.

const obs$ = Rx.Observable.of("Foo")
  .do(() => console.log("triggered!"));
  
obs$.subscribe();
obs$.subscribe();
<script src="https://unpkg.com/[email protected]/bundles/Rx.min.js"></script>

Thanks to Damian Hercun for informing that this was a now-fixed bug in RxJS 5.4.2.

Info:

https://github.com/ReactiveX/rxjs/pull/1935

https://github.com/ReactiveX/rxjs/issues/1921