function toRxNewObserver(observer) {
    var onNext = observer.onNext;
    var onError = observer.onError;
    var onCompleted = observer.onCompleted;
    if (
        typeof onNext !== "function" &&
        typeof onError !== "function" &&
        typeof onCompleted !== "function"
    ) {
        return observer;
    }
    // old observer!
    return {
        next: typeof onNext === "function"
            ? function(x) {
                  this.destination.onNext(x);
              }
            : noop,
        error: typeof onError === "function"
            ? function(err) {
                  this.destination.onError(err);
              }
            : noop,
        complete: typeof onCompleted === "function"
            ? function() {
                  this.destination.onCompleted();
              }
            : noop,
        destination: observer
    };
}
For the router there are several return types from user
functions.  The standard set are: synchronous type (boolean or
json graph) or an async type (observable or a thenable).