{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/64287162","id":64287162,"diff_hunk":"@@ -0,0 +1,11 @@\n+// @target: es5\n+// @module: commonjs\n+\n+// @filename: server.ts\n+var foo = 2;","path":"tests/cases/compiler/es6ExportClauseWithAssignmentInEs5.ts","position":5,"original_position":5,"commit_id":"9a4b6ab6262c2fd3c0c9d0765861bb7c8a828dde","original_commit_id":"9a4b6ab6262c2fd3c0c9d0765861bb7c8a828dde","user":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"body":"what about postfix and prefix increment operators.","created_at":"2016-05-23T20:55:01Z","updated_at":"2016-05-23T20:55:01Z","html_url":"https://github.com/Microsoft/TypeScript/pull/8739#discussion_r64287162","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/64287162"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/8739#discussion_r64287162"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739","id":70980137,"html_url":"https://github.com/Microsoft/TypeScript/pull/8739","diff_url":"https://github.com/Microsoft/TypeScript/pull/8739.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/8739.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8739","number":8739,"state":"open","locked":false,"title":"Fix #8738: Handles Re-assignment of Exported Clause Member","user":{"login":"evansb","id":5389670,"avatar_url":"https://avatars.githubusercontent.com/u/5389670?v=3","gravatar_id":"","url":"https://api.github.com/users/evansb","html_url":"https://github.com/evansb","followers_url":"https://api.github.com/users/evansb/followers","following_url":"https://api.github.com/users/evansb/following{/other_user}","gists_url":"https://api.github.com/users/evansb/gists{/gist_id}","starred_url":"https://api.github.com/users/evansb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansb/subscriptions","organizations_url":"https://api.github.com/users/evansb/orgs","repos_url":"https://api.github.com/users/evansb/repos","events_url":"https://api.github.com/users/evansb/events{/privacy}","received_events_url":"https://api.github.com/users/evansb/received_events","type":"User","site_admin":false},"body":"This Pull Request Fixes #8738.\r\n\r\nWhen exporting a clause directly, TypeScript emits the member assignment to `exports` after the variable declaration of the member. This ignores all assignment statement afterwards.\r\n\r\nPatch Summary:\r\nWhen there is assignment operator expression `=, +=, etc`, check if the target is a member of export clause. If it is, make sure that the export clause is updated.\r\n\r\nBehaviour before patch:\r\n```\r\nvar foo = 2;\r\nfoo = 3;\r\nexport { foo }\r\n```\r\ncompiles to\r\n```\r\nvar foo = 2;\r\nexports.foo = 2;\r\nfoo = 3;\r\n```\r\n\r\nCompile result after patch:\r\n```\r\nvar foo = 2;\r\nexports.foo = 2;\r\nexports.foo = foo = 3;\r\n```\r\n\r\nExport alias are updated as well, I use the same code for variable declaration.\r\n","created_at":"2016-05-22T15:38:56Z","updated_at":"2016-05-23T20:55:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0dcaf191fa01ff37417fc89a3920a0006edce91c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8739/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/9a4b6ab6262c2fd3c0c9d0765861bb7c8a828dde","head":{"label":"evansb:fix-8738","ref":"fix-8738","sha":"9a4b6ab6262c2fd3c0c9d0765861bb7c8a828dde","user":{"login":"evansb","id":5389670,"avatar_url":"https://avatars.githubusercontent.com/u/5389670?v=3","gravatar_id":"","url":"https://api.github.com/users/evansb","html_url":"https://github.com/evansb","followers_url":"https://api.github.com/users/evansb/followers","following_url":"https://api.github.com/users/evansb/following{/other_user}","gists_url":"https://api.github.com/users/evansb/gists{/gist_id}","starred_url":"https://api.github.com/users/evansb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansb/subscriptions","organizations_url":"https://api.github.com/users/evansb/orgs","repos_url":"https://api.github.com/users/evansb/repos","events_url":"https://api.github.com/users/evansb/events{/privacy}","received_events_url":"https://api.github.com/users/evansb/received_events","type":"User","site_admin":false},"repo":{"id":59136992,"name":"TypeScript","full_name":"evansb/TypeScript","owner":{"login":"evansb","id":5389670,"avatar_url":"https://avatars.githubusercontent.com/u/5389670?v=3","gravatar_id":"","url":"https://api.github.com/users/evansb","html_url":"https://github.com/evansb","followers_url":"https://api.github.com/users/evansb/followers","following_url":"https://api.github.com/users/evansb/following{/other_user}","gists_url":"https://api.github.com/users/evansb/gists{/gist_id}","starred_url":"https://api.github.com/users/evansb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansb/subscriptions","organizations_url":"https://api.github.com/users/evansb/orgs","repos_url":"https://api.github.com/users/evansb/repos","events_url":"https://api.github.com/users/evansb/events{/privacy}","received_events_url":"https://api.github.com/users/evansb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evansb/TypeScript","description":"TypeScript is a superset of JavaScript that compiles to clean JavaScript output.","fork":true,"url":"https://api.github.com/repos/evansb/TypeScript","forks_url":"https://api.github.com/repos/evansb/TypeScript/forks","keys_url":"https://api.github.com/repos/evansb/TypeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evansb/TypeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evansb/TypeScript/teams","hooks_url":"https://api.github.com/repos/evansb/TypeScript/hooks","issue_events_url":"https://api.github.com/repos/evansb/TypeScript/issues/events{/number}","events_url":"https://api.github.com/repos/evansb/TypeScript/events","assignees_url":"https://api.github.com/repos/evansb/TypeScript/assignees{/user}","branches_url":"https://api.github.com/repos/evansb/TypeScript/branches{/branch}","tags_url":"https://api.github.com/repos/evansb/TypeScript/tags","blobs_url":"https://api.github.com/repos/evansb/TypeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evansb/TypeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evansb/TypeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/evansb/TypeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evansb/TypeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/evansb/TypeScript/languages","stargazers_url":"https://api.github.com/repos/evansb/TypeScript/stargazers","contributors_url":"https://api.github.com/repos/evansb/TypeScript/contributors","subscribers_url":"https://api.github.com/repos/evansb/TypeScript/subscribers","subscription_url":"https://api.github.com/repos/evansb/TypeScript/subscription","commits_url":"https://api.github.com/repos/evansb/TypeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/evansb/TypeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/evansb/TypeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/evansb/TypeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/evansb/TypeScript/contents/{+path}","compare_url":"https://api.github.com/repos/evansb/TypeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evansb/TypeScript/merges","archive_url":"https://api.github.com/repos/evansb/TypeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evansb/TypeScript/downloads","issues_url":"https://api.github.com/repos/evansb/TypeScript/issues{/number}","pulls_url":"https://api.github.com/repos/evansb/TypeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/evansb/TypeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/evansb/TypeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evansb/TypeScript/labels{/name}","releases_url":"https://api.github.com/repos/evansb/TypeScript/releases{/id}","deployments_url":"https://api.github.com/repos/evansb/TypeScript/deployments","created_at":"2016-05-18T17:26:59Z","updated_at":"2016-05-18T17:27:36Z","pushed_at":"2016-05-22T15:24:46Z","git_url":"git://github.com/evansb/TypeScript.git","ssh_url":"git@github.com:evansb/TypeScript.git","clone_url":"https://github.com/evansb/TypeScript.git","svn_url":"https://github.com/evansb/TypeScript","homepage":"http://www.typescriptlang.org","size":254141,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"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":"3f9efa039aff8db77c791ddad2dc6c933151f963","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-05-23T20:41:27Z","pushed_at":"2016-05-23T20:53:50Z","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":501681,"stargazers_count":11687,"watchers_count":11687,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1506,"mirror_url":null,"open_issues_count":967,"forks":1506,"open_issues":967,"watchers":11687,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/8739"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/8739"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/8739/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8739/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript/statuses/9a4b6ab6262c2fd3c0c9d0765861bb7c8a828dde"}}}}
{"actor":{"display_login":"mhegazy"}}