I'm creating a class for my app that keeps an internal
Are you by any chance looking for the
.asObservable() method - which existed in Rxjs v4. Don't know if that is still the case in Rxjs v5 though.
According to this, the method should have been included in release 5.0.0-beta.2. Also I quote here their work-around if the functionality is not there :
You can get the same functionality by creating an observable with the private subject's subscribe function:
> const subj = new rx.Subject(); > const exposed = new rx.Observable(fn => subj.subscribe(fn));
For more details about subjects' semantics, you can have a look here.