{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/66701175","id":66701175,"diff_hunk":"@@ -846,6 +868,59 @@ namespace ts {\n                 || node;\r\n         }\r\n \r\n+        function substituteBinaryExpression(node: BinaryExpression): Expression {\r\n+            const left = node.left;\r\n+            // If the left-hand-side of the binaryExpression is an identifier and its is export through export Specifier\r\n+            if (isIdentifier(left) && isAssignmentOperator(node.operatorToken.kind)) {\r\n+               const sourceFile = getSourceFileOfNode(node);\r\n+               const sourceFileName = sourceFile ? sourceFile.fileName : undefined;\r\n+                if (bindingNameExportSpecifiers && bindingNameExportSpecifiers[sourceFileName] && hasProperty(bindingNameExportSpecifiers[sourceFileName], left.text)) {\r\n+                    setNodeEmitFlags(node, NodeEmitFlags.NoSubstitution);\r\n+                    let nestedExportAssignment: BinaryExpression;\r\n+                    for (const specifier of bindingNameExportSpecifiers[sourceFileName][left.text]) {\r\n+                        nestedExportAssignment = nestedExportAssignment ?\r\n+                            createExportAssignment(specifier.name, nestedExportAssignment) :\r\n+                            createExportAssignment(specifier.name, node);\r\n+                    }\r\n+                    return nestedExportAssignment;\r\n+                }\r\n+            }\r\n+            return node;\r\n+        }\r\n+\r\n+        function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression {\r\n+            // Because how the compiler only parse plusplus and minusminus to be either prefixUnaryExpression or postFixUnaryExpression depended on where they are\r\n+            // We don't need to check that the operator has SyntaxKind.plusplus or SyntaxKind.minusminus\r\n+            const operator = node.operator;\r\n+            const operand = node.operand;\r\n+            if (isIdentifier(operand) && bindingNameExportSpecifiers) {\r\n+                const sourceFile = getSourceFileOfNode(node);\r\n+               const sourceFileName = sourceFile ? sourceFile.fileName : undefined;\r\n+                if (bindingNameExportSpecifiers && bindingNameExportSpecifiers[sourceFileName] && hasProperty(bindingNameExportSpecifiers[sourceFileName], operand.text)) {\r\n+                    setNodeEmitFlags(node, NodeEmitFlags.NoSubstitution);\r\n+                    let transformedUnaryExpression: BinaryExpression;\r\n+                    if (node.kind === SyntaxKind.PostfixUnaryExpression) {\r\n+                        transformedUnaryExpression = createBinaryWithOperatorToken(\r\n+                            operand,\r\n+                            createNode(operator === SyntaxKind.PlusPlusToken ? SyntaxKind.PlusEqualsToken : SyntaxKind.MinusEqualsToken),\r\n+                            createIdentifier(\"1\"),\r\n+                        /*location*/ node\r","path":"src/compiler/transformers/module/module.ts","position":95,"original_position":95,"commit_id":"7a022ee0c2688ed7f751ade3374176487e7a6e00","original_commit_id":"59d27ede2e6277a95052d5e2527fd051a9a0930d","user":{"login":"rbuckton","id":3902892,"avatar_url":"https://avatars.githubusercontent.com/u/3902892?v=3","gravatar_id":"","url":"https://api.github.com/users/rbuckton","html_url":"https://github.com/rbuckton","followers_url":"https://api.github.com/users/rbuckton/followers","following_url":"https://api.github.com/users/rbuckton/following{/other_user}","gists_url":"https://api.github.com/users/rbuckton/gists{/gist_id}","starred_url":"https://api.github.com/users/rbuckton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbuckton/subscriptions","organizations_url":"https://api.github.com/users/rbuckton/orgs","repos_url":"https://api.github.com/users/rbuckton/repos","events_url":"https://api.github.com/users/rbuckton/events{/privacy}","received_events_url":"https://api.github.com/users/rbuckton/received_events","type":"User","site_admin":false},"body":"nit: Indentation","created_at":"2016-06-11T05:16:33Z","updated_at":"2016-06-11T05:16:33Z","html_url":"https://github.com/Microsoft/TypeScript/pull/8991#discussion_r66701175","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/66701175"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/8991#discussion_r66701175"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991","id":72757948,"html_url":"https://github.com/Microsoft/TypeScript/pull/8991","diff_url":"https://github.com/Microsoft/TypeScript/pull/8991.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/8991.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8991","number":8991,"state":"open","locked":false,"title":"[Transforms] Merge master 06/06/2016","user":{"login":"yuit","id":489742,"avatar_url":"https://avatars.githubusercontent.com/u/489742?v=3","gravatar_id":"","url":"https://api.github.com/users/yuit","html_url":"https://github.com/yuit","followers_url":"https://api.github.com/users/yuit/followers","following_url":"https://api.github.com/users/yuit/following{/other_user}","gists_url":"https://api.github.com/users/yuit/gists{/gist_id}","starred_url":"https://api.github.com/users/yuit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuit/subscriptions","organizations_url":"https://api.github.com/users/yuit/orgs","repos_url":"https://api.github.com/users/yuit/repos","events_url":"https://api.github.com/users/yuit/events{/privacy}","received_events_url":"https://api.github.com/users/yuit/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-06T18:47:05Z","updated_at":"2016-06-11T05:16:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9100e1d333ce3aaf22411b99c56dbd53ef8f147e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8991/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/7a022ee0c2688ed7f751ade3374176487e7a6e00","head":{"label":"Microsoft:transforms_mergemaster","ref":"transforms_mergemaster","sha":"7a022ee0c2688ed7f751ade3374176487e7a6e00","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-06-11T03:17:39Z","pushed_at":"2016-06-11T01:48:37Z","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":514211,"stargazers_count":12179,"watchers_count":12179,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1596,"mirror_url":null,"open_issues_count":941,"forks":1596,"open_issues":941,"watchers":12179,"default_branch":"master"}},"base":{"label":"Microsoft:transforms","ref":"transforms","sha":"ede7692620f2a83966c328d703b81787f48a7ca2","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-06-11T03:17:39Z","pushed_at":"2016-06-11T01:48:37Z","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":514211,"stargazers_count":12179,"watchers_count":12179,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1596,"mirror_url":null,"open_issues_count":941,"forks":1596,"open_issues":941,"watchers":12179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/8991"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/8991"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/8991/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/8991/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript/statuses/7a022ee0c2688ed7f751ade3374176487e7a6e00"}}}}
{"actor":{"display_login":"rbuckton"}}