kriskowal / q

A promise library for JavaScript
MIT License
14.94k stars 1.2k forks source link

Is it possible to use a native Promise object with q ? #836

Closed faressoft closed 6 years ago

faressoft commented 6 years ago

Is it possible to use a native Promise object with q ?

console.log(typeof q.all([]));

Doesn't return a native Promise. Is there anyway to force it to return a native Promise ?

kriskowal commented 6 years ago

Promise.resolve(promise) will coerce any promise to a standard library promise. All promise methods of all libraries including the standard library will accept another kind of promise, by virtue of "thenability".