Top "Promise" questions

Promises are a tactic for deferred computing, suitable for several styles of concurrency: thread and event loop concurrency for local computation, and both synchronous and asynchronous remote messaging.

How do I convert an existing callback API to promises?

I want to work with promises but I have a callback API in a format like: 1. DOM load or other …

javascript node.js callback promise bluebird
What's the difference between returning value or Promise.resolve from then()

What is the difference between: and this: new Promise(function(res, rej) { res("aaa"); }) .then(function(result) { return Promise.resolve("…

javascript angularjs promise q
Node JS Promise.all and forEach

I have an array like structure that exposes async methods. The async method calls return array structures that in turn …

javascript node.js asynchronous promise
JavaScript Promises - reject vs. throw

I have read several articles on this subject, but it is still not clear to me if there is a …

javascript promise
How do I access previous promise results in a .then() chain?

I have restructured my code to promises, and built a wonderful long flat promise chain, consisting of multiple .then() callbacks. …

javascript scope promise bluebird es6-promise
Resolve promises one after another (i.e. in sequence)?

Consider the following code that reads an array of files in a serial/sequential manner. readFiles returns a promise, which …

javascript promise q sequential serial-processing
Using success/error/finally/catch with Promises in AngularJS

I'm using $http in AngularJs, and I'm not sure on how to use the returned promise and to handle errors. …

angularjs promise angularjs-http
How to use fetch in TypeScript

I am using window.fetch in Typescript, but I cannot cast the response directly to my custom type: I am …

typescript promise fetch
Promise.all().then() resolve?

Using Node 4.x. When you have a Promise.all(promises).then() what is the proper way to resolve the data …

javascript node.js promise
Return from a promise then()

I have got a javascript code like this: function justTesting() { promise.then(function(output) { return output + 1; }); } var test = justTesting(); I …

javascript promise