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

Commit 4eb16ae

Browse files
Kent C. Doddspetebacondarwin
Kent C. Dodds
authored andcommitted
docs($q): improve documentation of promises that resolve with another promise
Adds short explanation of promise chaining and a link for further explanation. Closes #11708 Closes #11712
1 parent c10b249 commit 4eb16ae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/ng/q.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@
140140
* provide a progress indication, before the promise is resolved or rejected.
141141
*
142142
* This method *returns a new promise* which is resolved or rejected via the return value of the
143-
* `successCallback`, `errorCallback`. It also notifies via the return value of the
144-
* `notifyCallback` method. The promise cannot be resolved or rejected from the notifyCallback
145-
* method.
143+
* `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved
144+
* with the value which is resolved in that promise using
145+
* [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
146+
* It also notifies via the return value of the `notifyCallback` method. The promise cannot be
147+
* resolved or rejected from the notifyCallback method.
146148
*
147149
* - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
148150
*

0 commit comments

Comments
 (0)