code: function (value, resolvedCallback, rejectCallback, progressCallback) {
              if (this.isPromise(value)) {
                  return value.then(resolvedCallback, rejectCallback, progressCallback);
              }
              var deferred = this.defer();
              deferred.then(resolvedCallback, rejectCallback, progressCallback);
              deferred.emitSuccess(value);
  
              return deferred.getPromise();
          }
docs: Registers an observer on a promise.
  
  @param {*} value promise or value to observe
  @param {Function} resolvedCallback function to be called with the resolved value
  @param {Function} rejectCallback function to be called with the rejection reason
  @param {Function} progressCallback function to be called when progress is made
  @return {Promise} promise for the return value from the invoked callback or the value
  if it is a non-promise value