{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/1606","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/1606/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/1606/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/1606/events","html_url":"https://github.com/facebook/flow/issues/1606","id":144975111,"number":1606,"title":"do property not found in object literal errors really help anyone?","user":{"login":"jedwards1211","id":1448194,"avatar_url":"https://avatars.githubusercontent.com/u/1448194?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards1211","html_url":"https://github.com/jedwards1211","followers_url":"https://api.github.com/users/jedwards1211/followers","following_url":"https://api.github.com/users/jedwards1211/following{/other_user}","gists_url":"https://api.github.com/users/jedwards1211/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards1211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards1211/subscriptions","organizations_url":"https://api.github.com/users/jedwards1211/orgs","repos_url":"https://api.github.com/users/jedwards1211/repos","events_url":"https://api.github.com/users/jedwards1211/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards1211/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-03-31T18:03:24Z","updated_at":"2016-12-17T23:08:12Z","closed_at":null,"body":"Maybe this has been fixed since Flow 0.20.1 but...\n\n``` jsx\n/* @flow */\n\nfunction createSelector(options: Object): Object {\n  let selector = {\n    beginTimestamp: {$lt: options.timeRange.end},\n    endTimestamp: {$gt: options.timeRange.begin}, \n  };\n\n  if (options.location && options.location !== 'all') {\n    selector.location = options.location;\n  }\n\n  return selector; \n}\n```\n\n``` jsx\n$ flow status\nreact-sandbox/scratch/flowissues.js:10\n 10:     selector.location = options.location;\n                  ^^^^^^^^ property `location`. Property not found in\n 10:     selector.location = options.location;\n         ^^^^^^^^ object literal\n\n\nFound 1 error\n```\n\nSeriously, how does this help?  I think this just wastes developer time.  Tacking new properties onto objects, or deleting properties, are valid JS operations and don't contradict the declared return type here, so what gives?\n\nJS is dynamically typed, the MongoDB API is dynamically typed, and therefore tacking new properties onto objects (even deleting properties sometimes) will always remain convenient, more convenient than Flow trying to help prevent whatever could hypothetically go wrong, in my opinion.\n"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/267792900","html_url":"https://github.com/facebook/flow/issues/1606#issuecomment-267792900","issue_url":"https://api.github.com/repos/facebook/flow/issues/1606","id":267792900,"user":{"login":"vkurchatkin","id":2993861,"avatar_url":"https://avatars.githubusercontent.com/u/2993861?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurchatkin","html_url":"https://github.com/vkurchatkin","followers_url":"https://api.github.com/users/vkurchatkin/followers","following_url":"https://api.github.com/users/vkurchatkin/following{/other_user}","gists_url":"https://api.github.com/users/vkurchatkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurchatkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurchatkin/subscriptions","organizations_url":"https://api.github.com/users/vkurchatkin/orgs","repos_url":"https://api.github.com/users/vkurchatkin/repos","events_url":"https://api.github.com/users/vkurchatkin/events{/privacy}","received_events_url":"https://api.github.com/users/vkurchatkin/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T23:08:12Z","updated_at":"2016-12-17T23:08:12Z","body":"@jedwards1211 I agree, this behaviour is safe, pretty common, and ideally should be supported"}}
{"actor":{"display_login":"vkurchatkin"}}