{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/4121","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/4121/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/4121/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/4121/events","html_url":"https://github.com/facebook/flow/issues/4121","id":234464867,"number":4121,"title":"bluebird and flow: Promise.map over Object.keys()","user":{"login":"Kiechlus","id":9875731,"avatar_url":"https://avatars0.githubusercontent.com/u/9875731?v=3","gravatar_id":"","url":"https://api.github.com/users/Kiechlus","html_url":"https://github.com/Kiechlus","followers_url":"https://api.github.com/users/Kiechlus/followers","following_url":"https://api.github.com/users/Kiechlus/following{/other_user}","gists_url":"https://api.github.com/users/Kiechlus/gists{/gist_id}","starred_url":"https://api.github.com/users/Kiechlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kiechlus/subscriptions","organizations_url":"https://api.github.com/users/Kiechlus/orgs","repos_url":"https://api.github.com/users/Kiechlus/repos","events_url":"https://api.github.com/users/Kiechlus/events{/privacy}","received_events_url":"https://api.github.com/users/Kiechlus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-06-08T09:27:19Z","updated_at":"2017-06-08T11:38:14Z","closed_at":null,"body":"[Please refer to this example.](https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoALgTwA4FMwBCuuATmALxgDeqYYARiQIYB2AJgFxgDO6JAliwDmAGlpgmMAMZwAFnBhcWAVwC29UmIC+GHPgDqTdKQrVxjVpx59BosKh1Y8YACICWAa26madDaS4iTXEEIwCwQ2MSB1RUKGUWKXR+OBYwAA9MAC8ACjZ3LzAuN0EvAEozOgB5egArXCSAOg9cTG48gu4yxtUmbA7SgDkmVXxyAD5KuhkWXjB80tMFz24AbWWPYdGAXXF5gsaLdgBuMGBgVzhcbhYAcnQwdFkSRAlvXHS8JNw2PY3GyQyeQwU7nMAAFWeiG8THenwaxl+dC0ZXE4hmcwACi9VPxuGMwCRcABHZT8Ik5W70GDKXD0clsW5lY7ibFwXH4np9HI1epNFptAYrMoifZDEZjSa+OhgDEPDZLTrrApbXDbFkysWeAHSOQKUEXFxXG73R5QpD0ZQPbjyZQwNgAQnEKIcQA\r\n)\r\n\r\nFlow surprised me that it can infer everything in `Object.keys(...).map`. However, I need the same for [Promise.map](http://bluebirdjs.com/docs/api/promise.map.html), where it does not work anymore. \r\n\r\nExtract from the whole example: \r\n\r\n    const Promise = require('bluebird');\r\n    Promise.map(Object.keys(drinks), drinkName => {\r\n       const drink = drinks[drinkName];\r\n       drink.alcohol; // Doesn't throw but should!\r\n    })"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/307078234","html_url":"https://github.com/facebook/flow/issues/4121#issuecomment-307078234","issue_url":"https://api.github.com/repos/facebook/flow/issues/4121","id":307078234,"user":{"login":"Kiechlus","id":9875731,"avatar_url":"https://avatars0.githubusercontent.com/u/9875731?v=3","gravatar_id":"","url":"https://api.github.com/users/Kiechlus","html_url":"https://github.com/Kiechlus","followers_url":"https://api.github.com/users/Kiechlus/followers","following_url":"https://api.github.com/users/Kiechlus/following{/other_user}","gists_url":"https://api.github.com/users/Kiechlus/gists{/gist_id}","starred_url":"https://api.github.com/users/Kiechlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kiechlus/subscriptions","organizations_url":"https://api.github.com/users/Kiechlus/orgs","repos_url":"https://api.github.com/users/Kiechlus/repos","events_url":"https://api.github.com/users/Kiechlus/events{/privacy}","received_events_url":"https://api.github.com/users/Kiechlus/received_events","type":"User","site_admin":false},"created_at":"2017-06-08T11:38:14Z","updated_at":"2017-06-08T11:38:14Z","body":"Unfortunately, that didn't help. It uses [this map](https://github.com/flowtype/flow-typed/blob/master/definitions/npm/bluebird_v3.x.x/flow_v0.33.x-/bluebird_v3.x.x.js#L153)  instead of [the real definition of map](https://github.com/flowtype/flow-typed/blob/master/definitions/npm/bluebird_v3.x.x/flow_v0.33.x-/bluebird_v3.x.x.js#L76)."}}
{"actor":{"display_login":"Kiechlus"}}