{"action":"created","issue":{"url":"https://api.github.com/repos/acdlite/redux-actions/issues/183","repository_url":"https://api.github.com/repos/acdlite/redux-actions","labels_url":"https://api.github.com/repos/acdlite/redux-actions/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/acdlite/redux-actions/issues/183/comments","events_url":"https://api.github.com/repos/acdlite/redux-actions/issues/183/events","html_url":"https://github.com/acdlite/redux-actions/issues/183","id":202184474,"number":183,"title":"Anyone have any Flow definition files for redux-actions (perhaps just partial ones we can build from)?","user":{"login":"faceyspacey","id":154732,"avatar_url":"https://avatars.githubusercontent.com/u/154732?v=3","gravatar_id":"","url":"https://api.github.com/users/faceyspacey","html_url":"https://github.com/faceyspacey","followers_url":"https://api.github.com/users/faceyspacey/followers","following_url":"https://api.github.com/users/faceyspacey/following{/other_user}","gists_url":"https://api.github.com/users/faceyspacey/gists{/gist_id}","starred_url":"https://api.github.com/users/faceyspacey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faceyspacey/subscriptions","organizations_url":"https://api.github.com/users/faceyspacey/orgs","repos_url":"https://api.github.com/users/faceyspacey/repos","events_url":"https://api.github.com/users/faceyspacey/events{/privacy}","received_events_url":"https://api.github.com/users/faceyspacey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-20T16:33:39Z","updated_at":"2017-01-21T21:36:21Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/acdlite/redux-actions/issues/comments/274289874","html_url":"https://github.com/acdlite/redux-actions/issues/183#issuecomment-274289874","issue_url":"https://api.github.com/repos/acdlite/redux-actions/issues/183","id":274289874,"user":{"login":"faceyspacey","id":154732,"avatar_url":"https://avatars.githubusercontent.com/u/154732?v=3","gravatar_id":"","url":"https://api.github.com/users/faceyspacey","html_url":"https://github.com/faceyspacey","followers_url":"https://api.github.com/users/faceyspacey/followers","following_url":"https://api.github.com/users/faceyspacey/following{/other_user}","gists_url":"https://api.github.com/users/faceyspacey/gists{/gist_id}","starred_url":"https://api.github.com/users/faceyspacey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faceyspacey/subscriptions","organizations_url":"https://api.github.com/users/faceyspacey/orgs","repos_url":"https://api.github.com/users/faceyspacey/repos","events_url":"https://api.github.com/users/faceyspacey/events{/privacy}","received_events_url":"https://api.github.com/users/faceyspacey/received_events","type":"User","site_admin":false},"created_at":"2017-01-21T21:36:21Z","updated_at":"2017-01-21T21:36:21Z","body":"Also, here's a version with the `payload` properly parameterized in return types:\r\n\r\n```\r\ndeclare module 'redux-actions' {\r\n  declare type ActionType = string\r\n\r\n  declare type Action<P> = {\r\n    type: ActionType,\r\n    payload?: P,\r\n    error?: bool,\r\n    meta?: any,\r\n  }\r\n\r\n  declare function createAction<T, P>(\r\n    type: ActionType,\r\n    payloadCreator?: (...args: Array<T>) => P,\r\n    metaCreator?: Function\r\n  ): (...args: Array<T>) => Action<P>\r\n}\r\n```\r\n\r\nHere's how you would use it:\r\n\r\n```\r\ntype Payload = { index: number }\r\n\r\nexport const selectProfileTab = createAction('SELECT_PROFILE_TAB', (index: number): Payload => {\r\n  return { index }\r\n})\r\n```"}}
{"actor":{"display_login":"faceyspacey"}}