Promise

Sets the default Promise type to be used when the toPromisearrow-up-right method is called. Note that the Promise implementation must conform to the ES6 specification. Some of those supported libraries are Qarrow-up-right, RSVParrow-up-right, when.jsarrow-up-right among others. If not specified, this defaults to the native ES6 Promise, if available, else will throw an error.

Example

Rx.config.Promise = RSVP.Promise;

var p = Rx.Observable.just(1).toPromise()
  .then(value => console.log('Value: %s', s));
// => Value: 1

Last updated