{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/945","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/945/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/945/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/945/events","html_url":"https://github.com/facebook/flow/issues/945","id":111409796,"number":945,"title":"Flow doesn't recognize platform-specific react-native files","user":{"login":"eapache","id":1706826,"avatar_url":"https://avatars.githubusercontent.com/u/1706826?v=3","gravatar_id":"","url":"https://api.github.com/users/eapache","html_url":"https://github.com/eapache","followers_url":"https://api.github.com/users/eapache/followers","following_url":"https://api.github.com/users/eapache/following{/other_user}","gists_url":"https://api.github.com/users/eapache/gists{/gist_id}","starred_url":"https://api.github.com/users/eapache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eapache/subscriptions","organizations_url":"https://api.github.com/users/eapache/orgs","repos_url":"https://api.github.com/users/eapache/repos","events_url":"https://api.github.com/users/eapache/events{/privacy}","received_events_url":"https://api.github.com/users/eapache/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/feature%20request","name":"feature request","color":"d4c5f9"},{"url":"https://api.github.com/repos/facebook/flow/labels/module%20resolution","name":"module resolution","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2015-10-14T14:24:59Z","updated_at":"2016-07-14T09:14:47Z","closed_at":null,"body":"In recent react-native releases, common practice for files that need platform-specific implementations is to turn `foo.js` into two files: `foo.android.js` and `foo.ios.js`. Flow obviously doesn't know what to make of this, which leads to \"Required module not found\" errors.\r\n\r\nAs a temporary workaround you can add `module.name_mapper` for each such file, but maintaining this list is a lot of work, and the end result is that half your code isn't type-checked at all.\r\n\r\nIdeally, flow would recognize this pattern, and be able to type-check both implementations against the import (and against each other) to ensure they implement the same interface."},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/232611168","html_url":"https://github.com/facebook/flow/issues/945#issuecomment-232611168","issue_url":"https://api.github.com/repos/facebook/flow/issues/945","id":232611168,"user":{"login":"mhollweck","id":2960797,"avatar_url":"https://avatars.githubusercontent.com/u/2960797?v=3","gravatar_id":"","url":"https://api.github.com/users/mhollweck","html_url":"https://github.com/mhollweck","followers_url":"https://api.github.com/users/mhollweck/followers","following_url":"https://api.github.com/users/mhollweck/following{/other_user}","gists_url":"https://api.github.com/users/mhollweck/gists{/gist_id}","starred_url":"https://api.github.com/users/mhollweck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhollweck/subscriptions","organizations_url":"https://api.github.com/users/mhollweck/orgs","repos_url":"https://api.github.com/users/mhollweck/repos","events_url":"https://api.github.com/users/mhollweck/events{/privacy}","received_events_url":"https://api.github.com/users/mhollweck/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T09:14:47Z","updated_at":"2016-07-14T09:14:47Z","body":"`module.file_ext=.ios.js` works\r\nbut `module.file_ext=.android.js` doesn't. Anyone else experiencing this?"}}
{"actor":{"display_login":"mhollweck"}}