borisyankov/DefinitelyTyped — pull request #2796 by spadgos (2014-09-08 15:16:51+00:00)
Title: Correctly declare the return type of promise.filter and promise.map

As per #2788 - it appears that the definition of `promise.map` and `promise.filter` is a promise which would be resolved with a single object (`promise`) rather than an array of them (`promise`).

Example of 'real life' usage:

```js
p1 = Promise.resolve([1, 2, 3]); // Promise
p2 = p1.filter(function (n) { return n % 2 > 0; }); // Promise
p3 = p2.map(function (n) { return n * 2; }); // Promise

p3.then(console.log.bind(console)); // [2, 6]
```