Hacker News new | ask | show | jobs
by kamroot 1503 days ago
Any good resources to learn more about promises in-depth? Not your usual, cursory overview but in-depth with explanations for complicated usage (like promises returning promises etc.)?
3 comments

I have written four chapters about asynchronous JavaScript:

– Foundations: https://exploringjs.com/impatient-js/ch_async-js.html

– Promises for async programming: https://exploringjs.com/impatient-js/ch_promises.html

– Async functions: https://exploringjs.com/impatient-js/ch_async-functions.html

– Async iteration: https://exploringjs.com/impatient-js/ch_async-iteration.html

The MDN Docs never disappoint[0]. Even more details can be gotten from the author of OP's link: Exploring JS[1]. And if you're wondering why the catch block isn't typed properly in Typescript, see this [2] thread.

0 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

1 - https://exploringjs.com/es6/ch_async.html

2 - https://github.com/microsoft/TypeScript/issues/6283#issuecom...

It's meant for beginners, but I'm very partial to Eloquent JavaScript (I personally think it's one of the best programming books, period. And definitely one of the best JavaScript books)

https://eloquentjavascript.net/11_async.html

Full book: https://eloquentjavascript.net/