> For the complete documentation index, see [llms.txt](https://soufatn.gitbook.io/rxjs-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soufatn.gitbook.io/rxjs-book/summary/config/promise.md).

# Promise

Sets the default Promise type to be used when the [`toPromise`](https://github.com/soufatn/rxjs-book/tree/bf8b6376d5d3357f915110c3a4f92267055843f3/content/observable/observable_instance_methods/topromise.html) method is called. Note that the Promise implementation must conform to the ES6 specification. Some of those supported libraries are [Q](https://github.com/kriskowal/q), [RSVP](https://github.com/tildeio/rsvp.js), [when.js](https://github.com/cujojs/when) among others. If not specified, this defaults to the native ES6 Promise, if available, else will throw an error.

## Example

```javascript
Rx.config.Promise = RSVP.Promise;

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