Observer

Note the following code example creating an Observable

  1. let stream$ = Rx.Observables.create((observer) => {
  2. observer.next(4);
  3. })

create method takes a function with an input parameter observer.

An Observer is just an object with the following methods next error complete

  1. observer.next(1);
  2. observer.error('some error')
  3. observer.complete();