{"action":"created","issue":{"url":"https://api.github.com/repos/hunterloftis/awaiting/issues/6","repository_url":"https://api.github.com/repos/hunterloftis/awaiting","labels_url":"https://api.github.com/repos/hunterloftis/awaiting/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/hunterloftis/awaiting/issues/6/comments","events_url":"https://api.github.com/repos/hunterloftis/awaiting/issues/6/events","html_url":"https://github.com/hunterloftis/awaiting/issues/6","id":220788090,"number":6,"title":"FYI: type definitions submitted to flow-typed","user":{"login":"hallettj","id":9622,"avatar_url":"https://avatars0.githubusercontent.com/u/9622?v=3","gravatar_id":"","url":"https://api.github.com/users/hallettj","html_url":"https://github.com/hallettj","followers_url":"https://api.github.com/users/hallettj/followers","following_url":"https://api.github.com/users/hallettj/following{/other_user}","gists_url":"https://api.github.com/users/hallettj/gists{/gist_id}","starred_url":"https://api.github.com/users/hallettj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hallettj/subscriptions","organizations_url":"https://api.github.com/users/hallettj/orgs","repos_url":"https://api.github.com/users/hallettj/repos","events_url":"https://api.github.com/users/hallettj/events{/privacy}","received_events_url":"https://api.github.com/users/hallettj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-10T22:24:24Z","updated_at":"2017-04-10T23:28:25Z","closed_at":null,"body":"Hi! I'm the one who made a comment on Reddit about submitting type definitions. The pull request is in: https://github.com/flowtype/flow-typed/pull/774\r\n\r\nYou mentioned that you might want to incorporate type annotations in the source code. The definitions here could be pulled into your own code if you want to do that. I actually prefer to ship type definitions with the library itself when writing my own libraries, and I have a [Makefile](https://gist.github.com/hallettj/29b8e7815b264c88a0a0ee9dcddb6210) that I use in most of my projects for that purpose. The way that works is that you put type annotations in your source code in `src/whatever.js`, the build process uses Babel to strip out annotations when building `lib/whatever.js`, and the build process also puts a copy of the original source with annotations preserved in `lib/whatever.js.flow`. Flow will automatically look for type definitions for any `*.js` file in a file called `*.js.flow`.\r\n\r\nThere are advantages to shipping types yourself, and to publishing types through flow-typed. The main advantage of flow-typed is that it can publish variations of your types for multiple versions of Flow. That can be useful for consumers who are stuck on an older version of Flow. On the other hand if types are bundled in your library you can incorporate type-checking into your tests, you can be assured that type definitions stay in sync with library releases, and you have control over publication. (The last PR that I submitted to flow-typed has been waiting to be merged for about a month.)"},"comment":{"url":"https://api.github.com/repos/hunterloftis/awaiting/issues/comments/293107412","html_url":"https://github.com/hunterloftis/awaiting/issues/6#issuecomment-293107412","issue_url":"https://api.github.com/repos/hunterloftis/awaiting/issues/6","id":293107412,"user":{"login":"hunterloftis","id":364501,"avatar_url":"https://avatars0.githubusercontent.com/u/364501?v=3","gravatar_id":"","url":"https://api.github.com/users/hunterloftis","html_url":"https://github.com/hunterloftis","followers_url":"https://api.github.com/users/hunterloftis/followers","following_url":"https://api.github.com/users/hunterloftis/following{/other_user}","gists_url":"https://api.github.com/users/hunterloftis/gists{/gist_id}","starred_url":"https://api.github.com/users/hunterloftis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hunterloftis/subscriptions","organizations_url":"https://api.github.com/users/hunterloftis/orgs","repos_url":"https://api.github.com/users/hunterloftis/repos","events_url":"https://api.github.com/users/hunterloftis/events{/privacy}","received_events_url":"https://api.github.com/users/hunterloftis/received_events","type":"User","site_admin":false},"created_at":"2017-04-10T23:28:25Z","updated_at":"2017-04-10T23:28:25Z","body":"Thanks for both the PR and the explanation of tradeoffs!"}}
{"actor":{"display_login":"hunterloftis"}}