{"action":"created","comment":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments/181039633","pull_request_review_id":111569293,"id":181039633,"diff_hunk":"@@ -277,9 +277,9 @@ declare namespace React {\n \n     // Base component for plain JS classes\n     // tslint:disable-next-line:no-empty-interface\n-    interface Component<P = {}, S = {}> extends ComponentLifecycle<P, S> { }\n-    class Component<P, S> {\n-        constructor(props: P, context?: any);\n+    interface Component<P = {}, S = {}, DP extends Partial<P> = P> extends ComponentLifecycle<P, S> { }","path":"types/react/index.d.ts","position":7,"original_position":7,"commit_id":"ca8e4655671afb429723a4a9a4a9ead933c21373","original_commit_id":"ca8e4655671afb429723a4a9a4a9ead933c21373","user":{"login":"DovydasNavickas","id":7989797,"avatar_url":"https://avatars3.githubusercontent.com/u/7989797?v=4","gravatar_id":"","url":"https://api.github.com/users/DovydasNavickas","html_url":"https://github.com/DovydasNavickas","followers_url":"https://api.github.com/users/DovydasNavickas/followers","following_url":"https://api.github.com/users/DovydasNavickas/following{/other_user}","gists_url":"https://api.github.com/users/DovydasNavickas/gists{/gist_id}","starred_url":"https://api.github.com/users/DovydasNavickas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DovydasNavickas/subscriptions","organizations_url":"https://api.github.com/users/DovydasNavickas/orgs","repos_url":"https://api.github.com/users/DovydasNavickas/repos","events_url":"https://api.github.com/users/DovydasNavickas/events{/privacy}","received_events_url":"https://api.github.com/users/DovydasNavickas/received_events","type":"User","site_admin":false},"body":"Not in this PR for sure, but me and @MartynasZilinskas were talking about changing `P` into `Props` or `TProps` when big PRs will be merged (i.e. [new context API](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509)).","created_at":"2018-04-12T10:49:33Z","updated_at":"2018-04-12T10:49:33Z","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24336#discussion_r181039633","pull_request_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments/181039633"},"html":{"href":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24336#discussion_r181039633"},"pull_request":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336"}},"in_reply_to_id":180227485},"pull_request":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336","id":175525205,"html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24336","diff_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24336.diff","patch_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24336.patch","issue_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24336","number":24336,"state":"open","locked":false,"title":"React: add defaultProps type to Component<>","user":{"login":"goloveychuk","id":2370419,"avatar_url":"https://avatars3.githubusercontent.com/u/2370419?v=4","gravatar_id":"","url":"https://api.github.com/users/goloveychuk","html_url":"https://github.com/goloveychuk","followers_url":"https://api.github.com/users/goloveychuk/followers","following_url":"https://api.github.com/users/goloveychuk/following{/other_user}","gists_url":"https://api.github.com/users/goloveychuk/gists{/gist_id}","starred_url":"https://api.github.com/users/goloveychuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goloveychuk/subscriptions","organizations_url":"https://api.github.com/users/goloveychuk/orgs","repos_url":"https://api.github.com/users/goloveychuk/repos","events_url":"https://api.github.com/users/goloveychuk/events{/privacy}","received_events_url":"https://api.github.com/users/goloveychuk/received_events","type":"User","site_admin":false},"body":"this should solve a https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11640\r\nbut requires new usage:\r\n```ts\r\nclass Comp extends React.Component<Props, {}, typeof Comp.defaultProps> {}\r\n```\r\nAlso `DT` is optional, so it shouldn't break any existing code.\r\nIt looks like it's best way to deal with optional types with `strict` compiler mode.\r\nWe can't avoid writing `typeof Comp.defaultProps` since typescript don't allow using types for static props in base class. And, I think, we shouldn't wait for this another 2 years. \r\n\r\nAlso this pr requires supervising from React team, since there are could be some types which also need `DP`","created_at":"2018-03-16T12:56:00Z","updated_at":"2018-04-12T10:49:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c346c19b064b22eff9cae3b373e753ffdcf68632","assignee":null,"assignees":[],"requested_reviewers":[{"login":"johnnyreilly","id":1010525,"avatar_url":"https://avatars0.githubusercontent.com/u/1010525?v=4","gravatar_id":"","url":"https://api.github.com/users/johnnyreilly","html_url":"https://github.com/johnnyreilly","followers_url":"https://api.github.com/users/johnnyreilly/followers","following_url":"https://api.github.com/users/johnnyreilly/following{/other_user}","gists_url":"https://api.github.com/users/johnnyreilly/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyreilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyreilly/subscriptions","organizations_url":"https://api.github.com/users/johnnyreilly/orgs","repos_url":"https://api.github.com/users/johnnyreilly/repos","events_url":"https://api.github.com/users/johnnyreilly/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyreilly/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":397523192,"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels/Awaiting%20reviewer%20feedback","name":"Awaiting reviewer feedback","color":"0052cc","default":false},{"id":583294474,"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels/Has%20Merge%20Conflict","name":"Has Merge Conflict","color":"b60205","default":false},{"id":684321576,"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels/Popular%20package","name":"Popular package","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336/commits","review_comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336/comments","review_comment_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24336/comments","statuses_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/ca8e4655671afb429723a4a9a4a9ead933c21373","head":{"label":"goloveychuk:master","ref":"master","sha":"ca8e4655671afb429723a4a9a4a9ead933c21373","user":{"login":"goloveychuk","id":2370419,"avatar_url":"https://avatars3.githubusercontent.com/u/2370419?v=4","gravatar_id":"","url":"https://api.github.com/users/goloveychuk","html_url":"https://github.com/goloveychuk","followers_url":"https://api.github.com/users/goloveychuk/followers","following_url":"https://api.github.com/users/goloveychuk/following{/other_user}","gists_url":"https://api.github.com/users/goloveychuk/gists{/gist_id}","starred_url":"https://api.github.com/users/goloveychuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goloveychuk/subscriptions","organizations_url":"https://api.github.com/users/goloveychuk/orgs","repos_url":"https://api.github.com/users/goloveychuk/repos","events_url":"https://api.github.com/users/goloveychuk/events{/privacy}","received_events_url":"https://api.github.com/users/goloveychuk/received_events","type":"User","site_admin":false},"repo":{"id":125515223,"name":"DefinitelyTyped","full_name":"goloveychuk/DefinitelyTyped","owner":{"login":"goloveychuk","id":2370419,"avatar_url":"https://avatars3.githubusercontent.com/u/2370419?v=4","gravatar_id":"","url":"https://api.github.com/users/goloveychuk","html_url":"https://github.com/goloveychuk","followers_url":"https://api.github.com/users/goloveychuk/followers","following_url":"https://api.github.com/users/goloveychuk/following{/other_user}","gists_url":"https://api.github.com/users/goloveychuk/gists{/gist_id}","starred_url":"https://api.github.com/users/goloveychuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goloveychuk/subscriptions","organizations_url":"https://api.github.com/users/goloveychuk/orgs","repos_url":"https://api.github.com/users/goloveychuk/repos","events_url":"https://api.github.com/users/goloveychuk/events{/privacy}","received_events_url":"https://api.github.com/users/goloveychuk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/goloveychuk/DefinitelyTyped","description":"The repository for high quality TypeScript type definitions.","fork":true,"url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped","forks_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/forks","keys_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/teams","hooks_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/hooks","issue_events_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/issues/events{/number}","events_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/events","assignees_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/assignees{/user}","branches_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/branches{/branch}","tags_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/tags","blobs_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/git/refs{/sha}","trees_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/statuses/{sha}","languages_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/languages","stargazers_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/stargazers","contributors_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/contributors","subscribers_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/subscribers","subscription_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/subscription","commits_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/commits{/sha}","git_commits_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/git/commits{/sha}","comments_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/comments{/number}","issue_comment_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/issues/comments{/number}","contents_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/contents/{+path}","compare_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/merges","archive_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/downloads","issues_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/issues{/number}","pulls_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/pulls{/number}","milestones_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/milestones{/number}","notifications_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/labels{/name}","releases_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/releases{/id}","deployments_url":"https://api.github.com/repos/goloveychuk/DefinitelyTyped/deployments","created_at":"2018-03-16T12:44:33Z","updated_at":"2018-03-19T14:05:24Z","pushed_at":"2018-03-19T14:05:18Z","git_url":"git://github.com/goloveychuk/DefinitelyTyped.git","ssh_url":"git@github.com:goloveychuk/DefinitelyTyped.git","clone_url":"https://github.com/goloveychuk/DefinitelyTyped.git","svn_url":"https://github.com/goloveychuk/DefinitelyTyped","homepage":"http://definitelytyped.org/","size":304312,"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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DefinitelyTyped:master","ref":"master","sha":"9f4c75126167d0d8af759f58405d53d983e94ad0","user":{"login":"DefinitelyTyped","id":3637556,"avatar_url":"https://avatars1.githubusercontent.com/u/3637556?v=4","gravatar_id":"","url":"https://api.github.com/users/DefinitelyTyped","html_url":"https://github.com/DefinitelyTyped","followers_url":"https://api.github.com/users/DefinitelyTyped/followers","following_url":"https://api.github.com/users/DefinitelyTyped/following{/other_user}","gists_url":"https://api.github.com/users/DefinitelyTyped/gists{/gist_id}","starred_url":"https://api.github.com/users/DefinitelyTyped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefinitelyTyped/subscriptions","organizations_url":"https://api.github.com/users/DefinitelyTyped/orgs","repos_url":"https://api.github.com/users/DefinitelyTyped/repos","events_url":"https://api.github.com/users/DefinitelyTyped/events{/privacy}","received_events_url":"https://api.github.com/users/DefinitelyTyped/received_events","type":"Organization","site_admin":false},"repo":{"id":6093316,"name":"DefinitelyTyped","full_name":"DefinitelyTyped/DefinitelyTyped","owner":{"login":"DefinitelyTyped","id":3637556,"avatar_url":"https://avatars1.githubusercontent.com/u/3637556?v=4","gravatar_id":"","url":"https://api.github.com/users/DefinitelyTyped","html_url":"https://github.com/DefinitelyTyped","followers_url":"https://api.github.com/users/DefinitelyTyped/followers","following_url":"https://api.github.com/users/DefinitelyTyped/following{/other_user}","gists_url":"https://api.github.com/users/DefinitelyTyped/gists{/gist_id}","starred_url":"https://api.github.com/users/DefinitelyTyped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefinitelyTyped/subscriptions","organizations_url":"https://api.github.com/users/DefinitelyTyped/orgs","repos_url":"https://api.github.com/users/DefinitelyTyped/repos","events_url":"https://api.github.com/users/DefinitelyTyped/events{/privacy}","received_events_url":"https://api.github.com/users/DefinitelyTyped/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped","description":"The repository for high quality TypeScript type definitions.","fork":false,"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","forks_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/forks","keys_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/teams","hooks_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/hooks","issue_events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/events{/number}","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/events","assignees_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/assignees{/user}","branches_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/branches{/branch}","tags_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/tags","blobs_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/refs{/sha}","trees_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/{sha}","languages_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/languages","stargazers_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/stargazers","contributors_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/contributors","subscribers_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/subscribers","subscription_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/subscription","commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/commits{/sha}","git_commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/commits{/sha}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/comments{/number}","issue_comment_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/comments{/number}","contents_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/contents/{+path}","compare_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/merges","archive_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/downloads","issues_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues{/number}","pulls_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls{/number}","milestones_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/milestones{/number}","notifications_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels{/name}","releases_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/releases{/id}","deployments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/deployments","created_at":"2012-10-05T16:39:45Z","updated_at":"2018-04-12T09:04:37Z","pushed_at":"2018-04-12T10:49:06Z","git_url":"git://github.com/DefinitelyTyped/DefinitelyTyped.git","ssh_url":"git@github.com:DefinitelyTyped/DefinitelyTyped.git","clone_url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","svn_url":"https://github.com/DefinitelyTyped/DefinitelyTyped","homepage":"http://definitelytyped.org/","size":311775,"stargazers_count":15051,"watchers_count":15051,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12540,"mirror_url":null,"archived":false,"open_issues_count":2046,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":12540,"open_issues":2046,"watchers":15051,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336"},"html":{"href":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24336"},"issue":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24336"},"comments":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24336/comments"},"review_comments":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336/comments"},"review_comment":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/24336/commits"},"statuses":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/ca8e4655671afb429723a4a9a4a9ead933c21373"}},"author_association":"NONE"}}
{"actor":{"display_login":"DovydasNavickas"}}