Q promises can be resolve
d with only one argument – a promise stands for one single value, not for a collection of them. Put them in an array explicitly if you need multiple values. For the multiple-parameter-callbacks, you can use .spread()
.
More Related Contents:
- Chained promises not passing on rejection
- Issue in returning data retrieved from DB queries called in the loop
- return value after a promise [duplicate]
- Why is ‘this’ undefined inside class method when using promises? [duplicate]
- Are there still reasons to use promise libraries like Q or BlueBird now that we have ES6 promises? [closed]
- Proper way to skip a then function in Q Promises
- What happens if i reject / resolve multiple times in Kriskowal’s q?
- How do I convert an existing callback API to promises?
- When is .then(success, fail) considered an antipattern for promises?
- Is it bad practice to have a constructor function return a Promise?
- Resolve promises one after another (i.e. in sequence)?
- Correct way to write a non-blocking function in Node.js
- What are the differences between Deferred, Promise and Future in JavaScript?
- Asynchronous exception handling with bluebird promises
- Promise Retry Design Patterns
- How to sequentially run promises with Q in Javascript?
- Handling multiple catches in promise chain
- How do I tell if an object is a Promise?
- Why do I need to await an async function when it is not supposedly returning a Promise?
- Catching Errors in JavaScript Promises with a First Level try … catch
- How to block for a javascript promise and return the resolved result? [duplicate]
- using async await and .then together
- Promises: Repeat operation until it succeeds?
- Difference of using async / await vs promises?
- Javascript Asynchronous Exception Handling with node.js
- Produce a promise which depends on recursive promises
- Promise.all().then() resolve?
- Properly batch nested promises in Node
- JavaScript asynchronous programming: promises vs generators
- AngularJS Promises, $q, defer