borisyankov/DefinitelyTyped — pull request #1122 by seanhess (2013-10-10 21:41:53+00:00)
Title: Q: support nested promises

On my system, the following would throw an error, because it was matching the value-based function definition before the promise-based one.

function():Q.IPromise {
return doSomething().then(function (stuff) {
return anotherPromise(stuff);
})
}

I reversed the order of the function overloads so it matches the ones that return promises first, instead of the values.