{"action":"created","comment":{"url":"https://api.github.com/repos/reactjs/redux/pulls/comments/78839912","id":78839912,"diff_hunk":"@@ -0,0 +1,73 @@\n+import type { Dispatch, Store } from 'redux'\n+\n+declare module 'react-redux' {\n+\n+  /*\n+\n+    S = State\n+    A = Action\n+    OP = OwnProps\n+    SP = StateProps\n+    DP = DispatchProps\n+\n+  */\n+\n+  declare type MapStateToProps<S, OP: Object, SP: Object> = (state: S, ownProps: OP) => SP | MapStateToProps<S, OP, SP>;\n+\n+  declare type MapDispatchToProps<A, OP: Object, DP: Object> = ((dispatch: Dispatch<A>, ownProps: OP) => DP) | DP;\n+\n+  declare type MergeProps<SP, DP: Object, OP: Object, P: Object> = (stateProps: SP, dispatchProps: DP, ownProps: OP) => P;\n+\n+  declare type StatelessComponent<P> = (props: P) => ?React$Element<any>;\n+\n+  declare class ConnectedComponent<OP, P, Def, St> extends React$Component<void, OP, void> {\n+    static WrappedComponent: Class<React$Component<Def, P, St>>;\n+    getWrappedInstance(): React$Component<Def, P, St>;\n+    static defaultProps: void;\n+    props: OP;\n+    state: void;\n+  }\n+\n+  declare type ConnectedComponentClass<OP, P, Def, St> = Class<ConnectedComponent<OP, P, Def, St>>;\n+\n+  declare type Connector<OP, P> = {\n+    (component: StatelessComponent<P>): ConnectedComponentClass<OP, P, void, void>;\n+    <Def, St>(component: Class<React$Component<Def, P, St>>): ConnectedComponentClass<OP, P, Def, St>;\n+  };\n+\n+  declare class Provider<S, A> extends React$Component<void, { store: Store<S, A>, children?: any }, void> { }\n+\n+  declare type ConnectOptions = {\n+    pure?: boolean,\n+    withRef?: boolean\n+  };\n+\n+  declare function connect<A, OP>(\n+    options?: ConnectOptions\n+  ): Connector<OP, { dispatch: Dispatch<A> } & OP>;","path":"flow-typed/react-redux.js","position":47,"original_position":47,"commit_id":"204af592b7c39787969e16494935a7be428ce7c3","original_commit_id":"204af592b7c39787969e16494935a7be428ce7c3","user":{"login":"jimbolla","id":1851364,"avatar_url":"https://avatars.githubusercontent.com/u/1851364?v=3","gravatar_id":"","url":"https://api.github.com/users/jimbolla","html_url":"https://github.com/jimbolla","followers_url":"https://api.github.com/users/jimbolla/followers","following_url":"https://api.github.com/users/jimbolla/following{/other_user}","gists_url":"https://api.github.com/users/jimbolla/gists{/gist_id}","starred_url":"https://api.github.com/users/jimbolla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimbolla/subscriptions","organizations_url":"https://api.github.com/users/jimbolla/orgs","repos_url":"https://api.github.com/users/jimbolla/repos","events_url":"https://api.github.com/users/jimbolla/events{/privacy}","received_events_url":"https://api.github.com/users/jimbolla/received_events","type":"User","site_admin":false},"body":"Am I reading this correctly that this is stating there's an overload of `connect` that will accept `options` as the first parameter? If so, that's incorrect.  `options` will only be recognized as the 4th parameter. If you wanted to pass `options` but nothing else. you'd have to do `connect(null, null, null, { withRef: true })`, for example.","created_at":"2016-09-14T21:01:12Z","updated_at":"2016-09-14T21:01:12Z","html_url":"https://github.com/reactjs/redux/pull/1887#discussion_r78839912","pull_request_url":"https://api.github.com/repos/reactjs/redux/pulls/1887","_links":{"self":{"href":"https://api.github.com/repos/reactjs/redux/pulls/comments/78839912"},"html":{"href":"https://github.com/reactjs/redux/pull/1887#discussion_r78839912"},"pull_request":{"href":"https://api.github.com/repos/reactjs/redux/pulls/1887"}}},"pull_request":{"url":"https://api.github.com/repos/reactjs/redux/pulls/1887","id":80641565,"html_url":"https://github.com/reactjs/redux/pull/1887","diff_url":"https://github.com/reactjs/redux/pull/1887.diff","patch_url":"https://github.com/reactjs/redux/pull/1887.patch","issue_url":"https://api.github.com/repos/reactjs/redux/issues/1887","number":1887,"state":"open","locked":false,"title":"add examples with Flowtype support + libdefs for redux and react-redux","user":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"body":"**Using Flow for statically analyzing state and actions**\r\n\r\nThis PR is a proof of concept and is not meant to be merged\r\n\r\nAdded examples (ordered by difficulty)\r\n\r\n- `counter-flow`\r\n- `todos-flow`\r\n- `todomvc-flow`\r\n\r\nAdded libdefs (in the `ROOT/flow-typed` directory)\r\n\r\n- `redux`\r\n- `react-redux`\r\n\r\n**Observations**\r\n\r\n1) the best type safety is achieved by avoiding the following helpers\r\n\r\n- `combineReducers` (you can miss a field and / or assign a wrong reducer to a field)\r\n- `bindActionCreators` (<del>all action creator signatures are erased</del>) <= this is now type safe\r\n\r\n`combineReducers` may be replaced by combining the reducers by hand (see the todos-flow example). `bindActionCreators` is unsafe when an object is passed in. <del>However `bindActionCreators` also accepts a single function which is safer (see the todomvc-flow example)</del>\r\n\r\n2) `react-redux`'s libdef was pretty hard to write. Should cover the most common cases (at least)\r\n\r\n3) In order to please Flow I've done some refactorings but I tried to keep them as small as possible\r\n\r\n4) libdefs need community feedback, then we might consider to push them to flow-typed","created_at":"2016-08-09T15:27:20Z","updated_at":"2016-09-14T21:01:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20c8b84e8900ce3f00857ad0d3966a08eb0787b6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/reactjs/redux/pulls/1887/commits","review_comments_url":"https://api.github.com/repos/reactjs/redux/pulls/1887/comments","review_comment_url":"https://api.github.com/repos/reactjs/redux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactjs/redux/issues/1887/comments","statuses_url":"https://api.github.com/repos/reactjs/redux/statuses/204af592b7c39787969e16494935a7be428ce7c3","head":{"label":"gcanti:flow","ref":"flow","sha":"204af592b7c39787969e16494935a7be428ce7c3","user":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"repo":{"id":65200584,"name":"redux","full_name":"gcanti/redux","owner":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gcanti/redux","description":"Predictable state container for JavaScript apps","fork":true,"url":"https://api.github.com/repos/gcanti/redux","forks_url":"https://api.github.com/repos/gcanti/redux/forks","keys_url":"https://api.github.com/repos/gcanti/redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gcanti/redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gcanti/redux/teams","hooks_url":"https://api.github.com/repos/gcanti/redux/hooks","issue_events_url":"https://api.github.com/repos/gcanti/redux/issues/events{/number}","events_url":"https://api.github.com/repos/gcanti/redux/events","assignees_url":"https://api.github.com/repos/gcanti/redux/assignees{/user}","branches_url":"https://api.github.com/repos/gcanti/redux/branches{/branch}","tags_url":"https://api.github.com/repos/gcanti/redux/tags","blobs_url":"https://api.github.com/repos/gcanti/redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gcanti/redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gcanti/redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/gcanti/redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gcanti/redux/statuses/{sha}","languages_url":"https://api.github.com/repos/gcanti/redux/languages","stargazers_url":"https://api.github.com/repos/gcanti/redux/stargazers","contributors_url":"https://api.github.com/repos/gcanti/redux/contributors","subscribers_url":"https://api.github.com/repos/gcanti/redux/subscribers","subscription_url":"https://api.github.com/repos/gcanti/redux/subscription","commits_url":"https://api.github.com/repos/gcanti/redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/gcanti/redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/gcanti/redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/gcanti/redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/gcanti/redux/contents/{+path}","compare_url":"https://api.github.com/repos/gcanti/redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gcanti/redux/merges","archive_url":"https://api.github.com/repos/gcanti/redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gcanti/redux/downloads","issues_url":"https://api.github.com/repos/gcanti/redux/issues{/number}","pulls_url":"https://api.github.com/repos/gcanti/redux/pulls{/number}","milestones_url":"https://api.github.com/repos/gcanti/redux/milestones{/number}","notifications_url":"https://api.github.com/repos/gcanti/redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gcanti/redux/labels{/name}","releases_url":"https://api.github.com/repos/gcanti/redux/releases{/id}","deployments_url":"https://api.github.com/repos/gcanti/redux/deployments","created_at":"2016-08-08T11:57:37Z","updated_at":"2016-08-08T11:57:39Z","pushed_at":"2016-09-13T06:20:13Z","git_url":"git://github.com/gcanti/redux.git","ssh_url":"git@github.com:gcanti/redux.git","clone_url":"https://github.com/gcanti/redux.git","svn_url":"https://github.com/gcanti/redux","homepage":"http://redux.js.org","size":3731,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"reactjs:master","ref":"master","sha":"e5e608eb87f84d4c6ec22b3b4e59338d234904d5","user":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"repo":{"id":36535156,"name":"redux","full_name":"reactjs/redux","owner":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactjs/redux","description":"Predictable state container for JavaScript apps","fork":false,"url":"https://api.github.com/repos/reactjs/redux","forks_url":"https://api.github.com/repos/reactjs/redux/forks","keys_url":"https://api.github.com/repos/reactjs/redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactjs/redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactjs/redux/teams","hooks_url":"https://api.github.com/repos/reactjs/redux/hooks","issue_events_url":"https://api.github.com/repos/reactjs/redux/issues/events{/number}","events_url":"https://api.github.com/repos/reactjs/redux/events","assignees_url":"https://api.github.com/repos/reactjs/redux/assignees{/user}","branches_url":"https://api.github.com/repos/reactjs/redux/branches{/branch}","tags_url":"https://api.github.com/repos/reactjs/redux/tags","blobs_url":"https://api.github.com/repos/reactjs/redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactjs/redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactjs/redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactjs/redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactjs/redux/statuses/{sha}","languages_url":"https://api.github.com/repos/reactjs/redux/languages","stargazers_url":"https://api.github.com/repos/reactjs/redux/stargazers","contributors_url":"https://api.github.com/repos/reactjs/redux/contributors","subscribers_url":"https://api.github.com/repos/reactjs/redux/subscribers","subscription_url":"https://api.github.com/repos/reactjs/redux/subscription","commits_url":"https://api.github.com/repos/reactjs/redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactjs/redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactjs/redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactjs/redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactjs/redux/contents/{+path}","compare_url":"https://api.github.com/repos/reactjs/redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactjs/redux/merges","archive_url":"https://api.github.com/repos/reactjs/redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactjs/redux/downloads","issues_url":"https://api.github.com/repos/reactjs/redux/issues{/number}","pulls_url":"https://api.github.com/repos/reactjs/redux/pulls{/number}","milestones_url":"https://api.github.com/repos/reactjs/redux/milestones{/number}","notifications_url":"https://api.github.com/repos/reactjs/redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactjs/redux/labels{/name}","releases_url":"https://api.github.com/repos/reactjs/redux/releases{/id}","deployments_url":"https://api.github.com/repos/reactjs/redux/deployments","created_at":"2015-05-29T23:53:15Z","updated_at":"2016-09-14T20:57:58Z","pushed_at":"2016-09-14T14:03:44Z","git_url":"git://github.com/reactjs/redux.git","ssh_url":"git@github.com:reactjs/redux.git","clone_url":"https://github.com/reactjs/redux.git","svn_url":"https://github.com/reactjs/redux","homepage":"http://redux.js.org","size":14185,"stargazers_count":23031,"watchers_count":23031,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3612,"mirror_url":null,"open_issues_count":50,"forks":3612,"open_issues":50,"watchers":23031,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactjs/redux/pulls/1887"},"html":{"href":"https://github.com/reactjs/redux/pull/1887"},"issue":{"href":"https://api.github.com/repos/reactjs/redux/issues/1887"},"comments":{"href":"https://api.github.com/repos/reactjs/redux/issues/1887/comments"},"review_comments":{"href":"https://api.github.com/repos/reactjs/redux/pulls/1887/comments"},"review_comment":{"href":"https://api.github.com/repos/reactjs/redux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactjs/redux/pulls/1887/commits"},"statuses":{"href":"https://api.github.com/repos/reactjs/redux/statuses/204af592b7c39787969e16494935a7be428ce7c3"}}}}
{"actor":{"display_login":"jimbolla"}}