Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit b4ee8e9

Browse files
Merge pull request #612 from aaronshaf/patch-2
spelling
2 parents c9ecd63 + fb0a0b3 commit b4ee8e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

doc/gettingstarted/promises.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Promises are a defacto standard within JavaScript community and is part of the ECMAScript Standard. A promise represents the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its then method, which registers callbacks to receive either a promise’s eventual value or the reason why the promise cannot be fulfilled. You can create them very easily where the constructor has two functions, `resolve` and `reject` which resolves the value or rejects it for a given reason. RxJS is fully committed to standards and has native support for Promises for any number of methods where they can be used interchangeably with Observable sequences.
44

5-
The advantage that you get when you intermix Promises with Observable sequences is that unlike the ES6 Promise standard, you get cancellation semantics which means you can disregard values if you no longer are interested. One of the biggest problems around Promises right now are around cancellation, as to cancel the operation, such as an XHR is not easily done with the existing standard, nor is it to only get the last value to ensure no out of order requests. With Obseravble sequences, you get that behavior for free in a multicast behavior, instead of the unicast Promise behavior.
5+
The advantage that you get when you intermix Promises with Observable sequences is that unlike the ES6 Promise standard, you get cancellation semantics which means you can disregard values if you no longer are interested. One of the biggest problems around Promises right now are around cancellation, as to cancel the operation, such as an XHR is not easily done with the existing standard, nor is it to only get the last value to ensure no out of order requests. With Observable sequences, you get that behavior for free in a multicast behavior, instead of the unicast Promise behavior.
66

77
The following list of operators natively support Promises:
88
- [`Rx.Observable.amb`](https://github.com/Reactive-Extensions/RxJS/tree/master/doc/api/core/operators/amb.md) | [`Rx.Observable.prototype.amb`](https://github.com/Reactive-Extensions/RxJS/tree/master/doc/api/core/operators/ambproto.md)
@@ -166,4 +166,4 @@ source1.then(
166166
```
167167

168168
Concepts
169-
- [Querying Observable Sequences](querying.md)
169+
- [Querying Observable Sequences](querying.md)

0 commit comments

Comments
 (0)