Open rauschma opened 6 years ago
@VernonHawk Thanks! Both things will be fixed in the next release.
“37.6.4 Not all nesting is bad” shows how nesting can be beneficial. The code sample uses finally()
, which hasn't been discussed before, so it's not obvious what the code does.
The finally()
method should probably be discussed earlier in the chapter.
For completeness sake, it might also make sense to mention the second (optional) parameter to then()
.
In 37.1.1 It's mentioned, "A Promise-based function returns a Promise and sends it a result or an error (if and when it is done). The Promise passes it on to the relevant callbacks.", (But the promise based function 'addAsync()' only returns Promise and it is inside the promise the result or error is evaluated and passed on via resolve or reject, which is handled by call-backs of .then() or .catch().) The aforementioned statement in quotes is confusing. Can you please make it more clear by being more specific with an example.
40.5.2.3 A simple implementation of Promise.all() function all(iterable) { ... const result = []; // (instead of let result;)
Typo in
37.1.4. States of promises
A mistake in
37.6.4. Nesting per se is not evil
But this code shows an example of good nesting.