{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/2143","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/2143/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/2143/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/2143/events","html_url":"https://github.com/facebook/flow/issues/2143","id":167811975,"number":2143,"title":"Annotation required in an if statement condition, why?","user":{"login":"Foxhoundn","id":8861481,"avatar_url":"https://avatars.githubusercontent.com/u/8861481?v=3","gravatar_id":"","url":"https://api.github.com/users/Foxhoundn","html_url":"https://github.com/Foxhoundn","followers_url":"https://api.github.com/users/Foxhoundn/followers","following_url":"https://api.github.com/users/Foxhoundn/following{/other_user}","gists_url":"https://api.github.com/users/Foxhoundn/gists{/gist_id}","starred_url":"https://api.github.com/users/Foxhoundn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foxhoundn/subscriptions","organizations_url":"https://api.github.com/users/Foxhoundn/orgs","repos_url":"https://api.github.com/users/Foxhoundn/repos","events_url":"https://api.github.com/users/Foxhoundn/events{/privacy}","received_events_url":"https://api.github.com/users/Foxhoundn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/missing%20annotations","name":"missing annotations","color":"b60205"},{"url":"https://api.github.com/repos/facebook/flow/labels/Needs%20docs","name":"Needs docs","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-27T09:37:16Z","updated_at":"2016-07-28T19:28:55Z","closed_at":null,"body":"This is the relevant code\r\n\r\n```\r\nstate: {\r\n  showDropdown: boolean,\r\n  selected: Array<*>,\r\n};\r\n\r\nstate = {\r\n  showDropdown: this.props.show,\r\n  selected: this.props.selected || [(this.props.def: ?string)],\r\n};\r\n\r\ncomponentDidUpdate(): void {\r\n  document.removeEventListener('click', this.handleOutsideClick);\r\n\r\n  if (this.state.showDropdown) {\r\n    document.addEventListener('click', this.handleOutsideClick);\r\n  }\r\n}\r\n```\r\n\r\nFlow outputs -\r\n\r\n```\r\n44:     if (this.state.showDropdown) {\r\n             ^^^^^^^^^^^^^^^^^^^^^^^ property `showDropdown`. Missing annotation\r\n```\r\n\r\n?? Why ??"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/235999789","html_url":"https://github.com/facebook/flow/issues/2143#issuecomment-235999789","issue_url":"https://api.github.com/repos/facebook/flow/issues/2143","id":235999789,"user":{"login":"avikchaudhuri","id":5328177,"avatar_url":"https://avatars.githubusercontent.com/u/5328177?v=3","gravatar_id":"","url":"https://api.github.com/users/avikchaudhuri","html_url":"https://github.com/avikchaudhuri","followers_url":"https://api.github.com/users/avikchaudhuri/followers","following_url":"https://api.github.com/users/avikchaudhuri/following{/other_user}","gists_url":"https://api.github.com/users/avikchaudhuri/gists{/gist_id}","starred_url":"https://api.github.com/users/avikchaudhuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avikchaudhuri/subscriptions","organizations_url":"https://api.github.com/users/avikchaudhuri/orgs","repos_url":"https://api.github.com/users/avikchaudhuri/repos","events_url":"https://api.github.com/users/avikchaudhuri/events{/privacy}","received_events_url":"https://api.github.com/users/avikchaudhuri/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T19:28:55Z","updated_at":"2016-07-28T19:28:55Z","body":"In general Flow need annotations for any part of an exported type that it cannot pin down exactly. Can you paste the entire file?"}}
{"actor":{"display_login":"avikchaudhuri"}}