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.

AngularJS : Where to use promises?

I saw some examples of Facebook Login services that were using promises to access FB Graph API. Example #1: this.api = …

angularjs deferred promise
Cancel a vanilla ECMAScript 6 Promise chain

Is there a method for clearing the .thens of a JavaScript Promise instance? I've written a JavaScript test framework on …

javascript promise cancellation es6-promise
typescript: error TS2693: 'Promise' only refers to a type, but is being used as a value here

I am trying to use Typescript for my AWS Lambda and i am getting the following errors where ever I …

javascript typescript promise
Understanding promises in Node.js

From what I have understood there are three ways of calling asynchronous code: Events, e.g. request.on("event", callback); …

javascript node.js promise
How do I properly test promises with mocha and chai?

The following test is behaving oddly: it('Should return the exchange rates for btc_ltc', function(done) { var pair = 'btc_…

node.js promise mocha chai
Promises, pass additional parameters to then chain

A promise, just for example: var P = new Promise(function (resolve, reject) { var a = 5; if (a) { setTimeout(function(){ resolve(a); }, 3000); } …

javascript promise ecmascript-6 es6-promise
Replacing callbacks with promises in Node.js

I have a simple node module which connects to a database and has several functions to receive data, for example …

javascript node.js promise q bluebird
Resolve Javascript Promise outside function scope

I have been using ES6 Promise. Ordinarily, a Promise is constructed and used like this new Promise(function(resolve, reject){ …

javascript promise es6-promise
How to make a promise from setTimeout

This is not a realworld problem, I'm just trying to understand how promises are created. I need to understand how …

javascript settimeout promise
Angular 2: Convert Observable to Promise

Q) How do I convert the following observable to a promise so I can call it with .then(...)? My method …

typescript angular promise observable