{"action":"created","comment":{"url":"https://api.github.com/repos/ant-design/ant-design/pulls/comments/194619293","pull_request_review_id":127823599,"id":194619293,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDYxOTI5Mw==","diff_hunk":"@@ -50,9 +48,16 @@ export interface BaseButtonProps {\n   ghost?: boolean;\n }\n \n-export type AnchorButtonProps = BaseButtonProps & React.AnchorHTMLAttributes<HTMLAnchorElement>;\n+export type AnchorButtonProps = {\n+  href: string;\n+  target?: string;\n+  onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n+} & BaseButtonProps & React.AnchorHTMLAttributes<HTMLAnchorElement>;\n \n-export type NativeButtonProps = BaseButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>;\n+export type NativeButtonProps = {\n+  htmlType?: string;\n+  onClick?: React.MouseEventHandler<HTMLButtonElement>;\n+} & BaseButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>;\n \n export type ButtonProps = AnchorButtonProps | NativeButtonProps;","path":"components/button/button.tsx","position":33,"original_position":33,"commit_id":"3f9760e3fc33a2a411752c753d365565e3e73570","original_commit_id":"3f9760e3fc33a2a411752c753d365565e3e73570","user":{"login":"zheeeng","id":1303154,"node_id":"MDQ6VXNlcjEzMDMxNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1303154?v=4","gravatar_id":"","url":"https://api.github.com/users/zheeeng","html_url":"https://github.com/zheeeng","followers_url":"https://api.github.com/users/zheeeng/followers","following_url":"https://api.github.com/users/zheeeng/following{/other_user}","gists_url":"https://api.github.com/users/zheeeng/gists{/gist_id}","starred_url":"https://api.github.com/users/zheeeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheeeng/subscriptions","organizations_url":"https://api.github.com/users/zheeeng/orgs","repos_url":"https://api.github.com/users/zheeeng/repos","events_url":"https://api.github.com/users/zheeeng/events{/privacy}","received_events_url":"https://api.github.com/users/zheeeng/received_events","type":"User","site_admin":false},"body":"@yesmeck What's the roadmap to introducing Conditional Type into the code base? We can improve the Omit type in `components/_util/type.ts`, and for better intelligence benefits, we can use\r\n\r\n(thanks to https://github.com/Microsoft/TypeScript/issues/12936#issuecomment-393202175)\r\n```typescript\r\ntype AllKeys<U> = U extends any ? keyof U : never;\r\ntype ExclusifyUnion<U> = [U] extends [infer V] ?\r\n V extends any ?\r\n (V & {[P in Exclude<AllKeys<U>, keyof V>]?: never})\r\n : never : never;\r\n\r\ntype ButtonProps = ExclusifyUnion<AnchorButtonProps | NativeButtonProps>;\r\n``` \r\nTo narrow untion props in calling them.\r\n\r\nOnce we use Button as\r\n```tsx\r\n<Button href=\"/path/to/open\" />\r\n```\r\nIt doesn't receive 'htmlType' as prop anymore.","created_at":"2018-06-12T05:37:24Z","updated_at":"2018-06-12T05:52:45Z","html_url":"https://github.com/ant-design/ant-design/pull/10877#discussion_r194619293","pull_request_url":"https://api.github.com/repos/ant-design/ant-design/pulls/10877","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/comments/194619293"},"html":{"href":"https://github.com/ant-design/ant-design/pull/10877#discussion_r194619293"},"pull_request":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/10877"}}},"pull_request":{"url":"https://api.github.com/repos/ant-design/ant-design/pulls/10877","id":194168634,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MTY4NjM0","html_url":"https://github.com/ant-design/ant-design/pull/10877","diff_url":"https://github.com/ant-design/ant-design/pull/10877.diff","patch_url":"https://github.com/ant-design/ant-design/pull/10877.patch","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/10877","number":10877,"state":"open","locked":false,"title":"Update button signature","user":{"login":"zheeeng","id":1303154,"node_id":"MDQ6VXNlcjEzMDMxNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1303154?v=4","gravatar_id":"","url":"https://api.github.com/users/zheeeng","html_url":"https://github.com/zheeeng","followers_url":"https://api.github.com/users/zheeeng/followers","following_url":"https://api.github.com/users/zheeeng/following{/other_user}","gists_url":"https://api.github.com/users/zheeeng/gists{/gist_id}","starred_url":"https://api.github.com/users/zheeeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheeeng/subscriptions","organizations_url":"https://api.github.com/users/zheeeng/orgs","repos_url":"https://api.github.com/users/zheeeng/repos","events_url":"https://api.github.com/users/zheeeng/events{/privacy}","received_events_url":"https://api.github.com/users/zheeeng/received_events","type":"User","site_admin":false},"body":"First of all, thank you for your contribution! :-)\r\n\r\nPlease makes sure that these checkboxes are checked before submitting your PR, thank you!\r\n\r\n* [x] Make sure that you propose PR to right branch: bugfix for `master`, feature for latest active branch `feature-x.x`.\r\n* [x] Make sure that you follow antd's [code convention](https://github.com/ant-design/ant-design/wiki/Code-convention-for-antd).\r\n* [x] Run `npm run lint` and fix those errors before submitting in order to keep consistent code style.\r\n* [x] Rebase before creating a PR to keep commit history clear.\r\n* [ ] Add some descriptions and refer relative issues for you PR.\r\n\r\nExtra checklist:\r\n\r\n**if** *isBugFix* **:**\r\n\r\n  * [ ] Make sure that you add at least one unit test for the bug which you had fixed.\r\n\r\n**elif** *isNewFeature* **:**\r\n\r\n  * [ ] Update API docs for the component.\r\n  * [ ] Update/Add demo to demonstrate new feature.\r\n  * [x] Update TypeScript definition for the component.\r\n  * [ ] Add unit tests for the feature.\r\n","created_at":"2018-06-12T05:20:12Z","updated_at":"2018-06-12T05:52:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10487d416a95a7782d1585ba1e9242573b20c905","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ant-design/ant-design/pulls/10877/commits","review_comments_url":"https://api.github.com/repos/ant-design/ant-design/pulls/10877/comments","review_comment_url":"https://api.github.com/repos/ant-design/ant-design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/10877/comments","statuses_url":"https://api.github.com/repos/ant-design/ant-design/statuses/3f9760e3fc33a2a411752c753d365565e3e73570","head":{"label":"zheeeng:fix-button-signature","ref":"fix-button-signature","sha":"3f9760e3fc33a2a411752c753d365565e3e73570","user":{"login":"zheeeng","id":1303154,"node_id":"MDQ6VXNlcjEzMDMxNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1303154?v=4","gravatar_id":"","url":"https://api.github.com/users/zheeeng","html_url":"https://github.com/zheeeng","followers_url":"https://api.github.com/users/zheeeng/followers","following_url":"https://api.github.com/users/zheeeng/following{/other_user}","gists_url":"https://api.github.com/users/zheeeng/gists{/gist_id}","starred_url":"https://api.github.com/users/zheeeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheeeng/subscriptions","organizations_url":"https://api.github.com/users/zheeeng/orgs","repos_url":"https://api.github.com/users/zheeeng/repos","events_url":"https://api.github.com/users/zheeeng/events{/privacy}","received_events_url":"https://api.github.com/users/zheeeng/received_events","type":"User","site_admin":false},"repo":{"id":118083995,"node_id":"MDEwOlJlcG9zaXRvcnkxMTgwODM5OTU=","name":"ant-design","full_name":"zheeeng/ant-design","owner":{"login":"zheeeng","id":1303154,"node_id":"MDQ6VXNlcjEzMDMxNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1303154?v=4","gravatar_id":"","url":"https://api.github.com/users/zheeeng","html_url":"https://github.com/zheeeng","followers_url":"https://api.github.com/users/zheeeng/followers","following_url":"https://api.github.com/users/zheeeng/following{/other_user}","gists_url":"https://api.github.com/users/zheeeng/gists{/gist_id}","starred_url":"https://api.github.com/users/zheeeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheeeng/subscriptions","organizations_url":"https://api.github.com/users/zheeeng/orgs","repos_url":"https://api.github.com/users/zheeeng/repos","events_url":"https://api.github.com/users/zheeeng/events{/privacy}","received_events_url":"https://api.github.com/users/zheeeng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zheeeng/ant-design","description":"🐜 A UI Design Language","fork":true,"url":"https://api.github.com/repos/zheeeng/ant-design","forks_url":"https://api.github.com/repos/zheeeng/ant-design/forks","keys_url":"https://api.github.com/repos/zheeeng/ant-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zheeeng/ant-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zheeeng/ant-design/teams","hooks_url":"https://api.github.com/repos/zheeeng/ant-design/hooks","issue_events_url":"https://api.github.com/repos/zheeeng/ant-design/issues/events{/number}","events_url":"https://api.github.com/repos/zheeeng/ant-design/events","assignees_url":"https://api.github.com/repos/zheeeng/ant-design/assignees{/user}","branches_url":"https://api.github.com/repos/zheeeng/ant-design/branches{/branch}","tags_url":"https://api.github.com/repos/zheeeng/ant-design/tags","blobs_url":"https://api.github.com/repos/zheeeng/ant-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zheeeng/ant-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zheeeng/ant-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/zheeeng/ant-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zheeeng/ant-design/statuses/{sha}","languages_url":"https://api.github.com/repos/zheeeng/ant-design/languages","stargazers_url":"https://api.github.com/repos/zheeeng/ant-design/stargazers","contributors_url":"https://api.github.com/repos/zheeeng/ant-design/contributors","subscribers_url":"https://api.github.com/repos/zheeeng/ant-design/subscribers","subscription_url":"https://api.github.com/repos/zheeeng/ant-design/subscription","commits_url":"https://api.github.com/repos/zheeeng/ant-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/zheeeng/ant-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/zheeeng/ant-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/zheeeng/ant-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/zheeeng/ant-design/contents/{+path}","compare_url":"https://api.github.com/repos/zheeeng/ant-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zheeeng/ant-design/merges","archive_url":"https://api.github.com/repos/zheeeng/ant-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zheeeng/ant-design/downloads","issues_url":"https://api.github.com/repos/zheeeng/ant-design/issues{/number}","pulls_url":"https://api.github.com/repos/zheeeng/ant-design/pulls{/number}","milestones_url":"https://api.github.com/repos/zheeeng/ant-design/milestones{/number}","notifications_url":"https://api.github.com/repos/zheeeng/ant-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zheeeng/ant-design/labels{/name}","releases_url":"https://api.github.com/repos/zheeeng/ant-design/releases{/id}","deployments_url":"https://api.github.com/repos/zheeeng/ant-design/deployments","created_at":"2018-01-19T06:01:05Z","updated_at":"2018-06-12T04:13:06Z","pushed_at":"2018-06-12T05:23:21Z","git_url":"git://github.com/zheeeng/ant-design.git","ssh_url":"git@github.com:zheeeng/ant-design.git","clone_url":"https://github.com/zheeeng/ant-design.git","svn_url":"https://github.com/zheeeng/ant-design","homepage":"http://ant.design","size":21074,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ant-design:master","ref":"master","sha":"99cad890eff63605995136ef1b4a06fe404c938f","user":{"login":"ant-design","id":12101536,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMTAxNTM2","avatar_url":"https://avatars3.githubusercontent.com/u/12101536?v=4","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"repo":{"id":34526884,"node_id":"MDEwOlJlcG9zaXRvcnkzNDUyNjg4NA==","name":"ant-design","full_name":"ant-design/ant-design","owner":{"login":"ant-design","id":12101536,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMTAxNTM2","avatar_url":"https://avatars3.githubusercontent.com/u/12101536?v=4","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ant-design/ant-design","description":"🐜 A UI Design Language","fork":false,"url":"https://api.github.com/repos/ant-design/ant-design","forks_url":"https://api.github.com/repos/ant-design/ant-design/forks","keys_url":"https://api.github.com/repos/ant-design/ant-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ant-design/ant-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ant-design/ant-design/teams","hooks_url":"https://api.github.com/repos/ant-design/ant-design/hooks","issue_events_url":"https://api.github.com/repos/ant-design/ant-design/issues/events{/number}","events_url":"https://api.github.com/repos/ant-design/ant-design/events","assignees_url":"https://api.github.com/repos/ant-design/ant-design/assignees{/user}","branches_url":"https://api.github.com/repos/ant-design/ant-design/branches{/branch}","tags_url":"https://api.github.com/repos/ant-design/ant-design/tags","blobs_url":"https://api.github.com/repos/ant-design/ant-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ant-design/ant-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ant-design/ant-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/ant-design/ant-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ant-design/ant-design/statuses/{sha}","languages_url":"https://api.github.com/repos/ant-design/ant-design/languages","stargazers_url":"https://api.github.com/repos/ant-design/ant-design/stargazers","contributors_url":"https://api.github.com/repos/ant-design/ant-design/contributors","subscribers_url":"https://api.github.com/repos/ant-design/ant-design/subscribers","subscription_url":"https://api.github.com/repos/ant-design/ant-design/subscription","commits_url":"https://api.github.com/repos/ant-design/ant-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/ant-design/ant-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/ant-design/ant-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/ant-design/ant-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/ant-design/ant-design/contents/{+path}","compare_url":"https://api.github.com/repos/ant-design/ant-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ant-design/ant-design/merges","archive_url":"https://api.github.com/repos/ant-design/ant-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ant-design/ant-design/downloads","issues_url":"https://api.github.com/repos/ant-design/ant-design/issues{/number}","pulls_url":"https://api.github.com/repos/ant-design/ant-design/pulls{/number}","milestones_url":"https://api.github.com/repos/ant-design/ant-design/milestones{/number}","notifications_url":"https://api.github.com/repos/ant-design/ant-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ant-design/ant-design/labels{/name}","releases_url":"https://api.github.com/repos/ant-design/ant-design/releases{/id}","deployments_url":"https://api.github.com/repos/ant-design/ant-design/deployments","created_at":"2015-04-24T15:37:24Z","updated_at":"2018-06-12T05:38:15Z","pushed_at":"2018-06-12T05:24:02Z","git_url":"git://github.com/ant-design/ant-design.git","ssh_url":"git@github.com:ant-design/ant-design.git","clone_url":"https://github.com/ant-design/ant-design.git","svn_url":"https://github.com/ant-design/ant-design","homepage":"http://ant.design","size":250070,"stargazers_count":29480,"watchers_count":29480,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8991,"mirror_url":null,"archived":false,"open_issues_count":234,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8991,"open_issues":234,"watchers":29480,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/10877"},"html":{"href":"https://github.com/ant-design/ant-design/pull/10877"},"issue":{"href":"https://api.github.com/repos/ant-design/ant-design/issues/10877"},"comments":{"href":"https://api.github.com/repos/ant-design/ant-design/issues/10877/comments"},"review_comments":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/10877/comments"},"review_comment":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/10877/commits"},"statuses":{"href":"https://api.github.com/repos/ant-design/ant-design/statuses/3f9760e3fc33a2a411752c753d365565e3e73570"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zheeeng"}}