{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/84198257","pull_request_review_id":4989043,"id":84198257,"diff_hunk":"@@ -2472,6 +2482,9 @@ namespace ts {\n                     return parseTupleType();\r\n                 case SyntaxKind.OpenParenToken:\r\n                     return parseParenthesizedType();\r\n+                case SyntaxKind.PartialKeyword:\r\n+                    const partialNode = tryParse(parsePartialType);\r","path":"src/compiler/parser.ts","position":41,"original_position":41,"commit_id":"a1d5f29733a4e282ed35621f05ff26a10d3cfe8c","original_commit_id":"a1d5f29733a4e282ed35621f05ff26a10d3cfe8c","user":{"login":"DanielRosenwasser","id":972891,"avatar_url":"https://avatars.githubusercontent.com/u/972891?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRosenwasser","html_url":"https://github.com/DanielRosenwasser","followers_url":"https://api.github.com/users/DanielRosenwasser/followers","following_url":"https://api.github.com/users/DanielRosenwasser/following{/other_user}","gists_url":"https://api.github.com/users/DanielRosenwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRosenwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRosenwasser/subscriptions","organizations_url":"https://api.github.com/users/DanielRosenwasser/orgs","repos_url":"https://api.github.com/users/DanielRosenwasser/repos","events_url":"https://api.github.com/users/DanielRosenwasser/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRosenwasser/received_events","type":"User","site_admin":false},"body":"Ah, it looks like my question above is answered here - that's what it looks like is happening @sandersn.\r\n\r\nThis is going to have some weird behavior because a lot of the time people will just get a very confusing error message due to the way function bodies will be parsed.\r\n\r\n```ts\r\ninterface partial { /*...*/ }\r\nfunction f(x: number): partial {\r\n\r\n}\r\n// error: expected function body\r\n```\r\n\r\nWhy not just make `partial` a reserved type keyword and make the error more obvious?","created_at":"2016-10-20T01:08:16Z","updated_at":"2016-10-20T01:10:51Z","html_url":"https://github.com/Microsoft/TypeScript/pull/11571#discussion_r84198257","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/84198257"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/11571#discussion_r84198257"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571","id":89109981,"html_url":"https://github.com/Microsoft/TypeScript/pull/11571","diff_url":"https://github.com/Microsoft/TypeScript/pull/11571.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/11571.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11571","number":11571,"state":"open","locked":false,"title":"Partial Types (#11233)","user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"body":"Fixes #11233 - `partial T`\r\n\r\nA *partial* type is a shallow copy of an existing type which:\r\n* Makes all properties optional\r\n* Removes any call or construct signatures\r\n* Adds `undefined` to the domains of string or numeric indexers (in strict null checks)\r\n\r\nThe `partial` operator distributes into other types:\r\n * `partial (T & U) === (partial T) & (partial U)`\r\n * `partial (T | U) === (partial T) | (partial U)`\r\n * `partial (partial T) === partial T`\r\n\r\nFor an object type `T`, `partial T` type follows the rules implied by the structural rules of the resulting partial type.\r\n\r\nFor a generic type parameter `T`, `partial T` is:\r\n * Only a valid source according to normal structural rules of partial form of its constraint\r\n * Only a valid target when the source is:\r\n   * `partial T`\r\n   * `T`\r\n   * `{}`\r\n\r\n","created_at":"2016-10-12T23:04:01Z","updated_at":"2016-10-20T01:10:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"514b47a2ee7c11e7aff5a86a0a217b64671c6c26","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11571/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/a1d5f29733a4e282ed35621f05ff26a10d3cfe8c","head":{"label":"RyanCavanaugh:subsetTypes","ref":"subsetTypes","sha":"a1d5f29733a4e282ed35621f05ff26a10d3cfe8c","user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"repo":{"id":34357954,"name":"TypeScript","full_name":"RyanCavanaugh/TypeScript","owner":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RyanCavanaugh/TypeScript","description":"TypeScript is a superset of JavaScript that compiles to clean JavaScript output.","fork":true,"url":"https://api.github.com/repos/RyanCavanaugh/TypeScript","forks_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/forks","keys_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/teams","hooks_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/hooks","issue_events_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/issues/events{/number}","events_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/events","assignees_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/assignees{/user}","branches_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/branches{/branch}","tags_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/tags","blobs_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/languages","stargazers_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/stargazers","contributors_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/contributors","subscribers_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/subscribers","subscription_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/subscription","commits_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/contents/{+path}","compare_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/merges","archive_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/downloads","issues_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/issues{/number}","pulls_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/labels{/name}","releases_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/releases{/id}","deployments_url":"https://api.github.com/repos/RyanCavanaugh/TypeScript/deployments","created_at":"2015-04-21T23:41:09Z","updated_at":"2016-01-19T21:37:12Z","pushed_at":"2016-10-19T20:58:16Z","git_url":"git://github.com/RyanCavanaugh/TypeScript.git","ssh_url":"git@github.com:RyanCavanaugh/TypeScript.git","clone_url":"https://github.com/RyanCavanaugh/TypeScript.git","svn_url":"https://github.com/RyanCavanaugh/TypeScript","homepage":"http://www.typescriptlang.org","size":286663,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"31a55e64523ec38b6e484f92fb2756b57e4f439d","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":20929025,"name":"TypeScript","full_name":"Microsoft/TypeScript","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/TypeScript","description":"TypeScript is a superset of JavaScript that compiles to clean JavaScript output.","fork":false,"url":"https://api.github.com/repos/Microsoft/TypeScript","forks_url":"https://api.github.com/repos/Microsoft/TypeScript/forks","keys_url":"https://api.github.com/repos/Microsoft/TypeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/TypeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/TypeScript/teams","hooks_url":"https://api.github.com/repos/Microsoft/TypeScript/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/TypeScript/events","assignees_url":"https://api.github.com/repos/Microsoft/TypeScript/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/TypeScript/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/TypeScript/tags","blobs_url":"https://api.github.com/repos/Microsoft/TypeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/TypeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/TypeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/TypeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/TypeScript/languages","stargazers_url":"https://api.github.com/repos/Microsoft/TypeScript/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/TypeScript/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/TypeScript/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/TypeScript/subscription","commits_url":"https://api.github.com/repos/Microsoft/TypeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/TypeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/TypeScript/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/TypeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/TypeScript/merges","archive_url":"https://api.github.com/repos/Microsoft/TypeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/TypeScript/downloads","issues_url":"https://api.github.com/repos/Microsoft/TypeScript/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/TypeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/TypeScript/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/TypeScript/deployments","created_at":"2014-06-17T15:28:39Z","updated_at":"2016-10-20T00:01:36Z","pushed_at":"2016-10-20T01:05:26Z","git_url":"git://github.com/Microsoft/TypeScript.git","ssh_url":"git@github.com:Microsoft/TypeScript.git","clone_url":"https://github.com/Microsoft/TypeScript.git","svn_url":"https://github.com/Microsoft/TypeScript","homepage":"http://www.typescriptlang.org","size":593794,"stargazers_count":15975,"watchers_count":15975,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2165,"mirror_url":null,"open_issues_count":1445,"forks":2165,"open_issues":1445,"watchers":15975,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/11571"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/11571"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/11571/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/11571/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript/statuses/a1d5f29733a4e282ed35621f05ff26a10d3cfe8c"}}}}
{"actor":{"display_login":"DanielRosenwasser"}}