{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/286","labels_url":"https://api.github.com/repos/facebook/flow/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/286/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/286/events","html_url":"https://github.com/facebook/flow/issues/286","id":59018166,"number":286,"title":"Accessing a property defined in a constructor in another file does not typecheck","user":{"login":"kwkbtr","id":3595560,"avatar_url":"https://avatars.githubusercontent.com/u/3595560?v=3","gravatar_id":"","url":"https://api.github.com/users/kwkbtr","html_url":"https://github.com/kwkbtr","followers_url":"https://api.github.com/users/kwkbtr/followers","following_url":"https://api.github.com/users/kwkbtr/following{/other_user}","gists_url":"https://api.github.com/users/kwkbtr/gists{/gist_id}","starred_url":"https://api.github.com/users/kwkbtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwkbtr/subscriptions","organizations_url":"https://api.github.com/users/kwkbtr/orgs","repos_url":"https://api.github.com/users/kwkbtr/repos","events_url":"https://api.github.com/users/kwkbtr/events{/privacy}","received_events_url":"https://api.github.com/users/kwkbtr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-26T04:47:28Z","updated_at":"2015-02-26T04:47:28Z","closed_at":null,"body":"I wanted to access to a property set in a constructor defined in `A.js` from another file `B.js`, but it failed to typecheck.\r\n\r\nA.js:\r\n```javascript\r\n/* @flow */\r\nfunction A() {\r\n    this.x = 1;\r\n}\r\n\r\n// this typechecks\r\nfunction foo(a: A) {\r\n    var x = a.x;\r\n}\r\n\r\nmodule.exports = A;\r\n```\r\n\r\nB.js:\r\n```javascript\r\n/* @flow */\r\nvar A = require(\"./A\");\r\n\r\n// this does not typecheck\r\nfunction bar(a: A) {\r\n    var x = a.x;\r\n}\r\n// B.js:6:13,15: property x\r\n// Property not found in\r\n//   A.js:2:1,4:1: prototype\r\n```\r\n\r\nIs this behavior a bug or intentional?"}}