{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/30194656","id":30194656,"diff_hunk":"@@ -3055,17 +3055,34 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {\n             }\r\n \r\n             function emitVariableStatement(node: VariableStatement) {\r\n+                let variableDeclarations = <VariableDeclaration[]>node.declarationList.declarations;\r\n                 let startIsEmitted = true;\r\n-                if (!(node.flags & NodeFlags.Export)) {\r\n-                    startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList);\r\n+                if (node.flags & NodeFlags.Export) {\r\n+                    if (!isES6ExportedDeclaration(node)) {\r\n+                        variableDeclarations = filter(variableDeclarations, node => !!node.initializer);\r","path":"src/compiler/emitter.ts","position":19,"original_position":19,"commit_id":"40182f3b8cb69d2a5f71a279c8d1b2f2495104f5","original_commit_id":"40182f3b8cb69d2a5f71a279c8d1b2f2495104f5","user":{"login":"tinganho","id":1324476,"avatar_url":"https://avatars.githubusercontent.com/u/1324476?v=3","gravatar_id":"","url":"https://api.github.com/users/tinganho","html_url":"https://github.com/tinganho","followers_url":"https://api.github.com/users/tinganho/followers","following_url":"https://api.github.com/users/tinganho/following{/other_user}","gists_url":"https://api.github.com/users/tinganho/gists{/gist_id}","starred_url":"https://api.github.com/users/tinganho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinganho/subscriptions","organizations_url":"https://api.github.com/users/tinganho/orgs","repos_url":"https://api.github.com/users/tinganho/repos","events_url":"https://api.github.com/users/tinganho/events{/privacy}","received_events_url":"https://api.github.com/users/tinganho/received_events","type":"User","site_admin":false},"body":">Write a new function outside of this one named emitIfInitializerIsPresent which takes a VariableDeclaration. When you're emitting an exported declaration, but you're not in ES6 mode, then instead of emitCommaList, we're going to use emitList directly (you can omit the null-check in emitCommaList in this case).\r\n\r\nI'm not sure I understand? Don't you need some kind of for loop then if it accepts `VariableDeclaration`?","created_at":"2015-05-13T00:43:03Z","updated_at":"2015-05-13T00:43:03Z","html_url":"https://github.com/Microsoft/TypeScript/pull/3085#discussion_r30194656","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/30194656"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/3085#discussion_r30194656"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085","id":35017374,"html_url":"https://github.com/Microsoft/TypeScript/pull/3085","diff_url":"https://github.com/Microsoft/TypeScript/pull/3085.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/3085.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3085","number":3085,"state":"open","locked":false,"title":"No emit on non initialized exports","user":{"login":"tinganho","id":1324476,"avatar_url":"https://avatars.githubusercontent.com/u/1324476?v=3","gravatar_id":"","url":"https://api.github.com/users/tinganho","html_url":"https://github.com/tinganho","followers_url":"https://api.github.com/users/tinganho/followers","following_url":"https://api.github.com/users/tinganho/following{/other_user}","gists_url":"https://api.github.com/users/tinganho/gists{/gist_id}","starred_url":"https://api.github.com/users/tinganho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinganho/subscriptions","organizations_url":"https://api.github.com/users/tinganho/orgs","repos_url":"https://api.github.com/users/tinganho/repos","events_url":"https://api.github.com/users/tinganho/events{/privacy}","received_events_url":"https://api.github.com/users/tinganho/received_events","type":"User","site_admin":false},"body":"Implements #2834. I added test on internal modules and external modules(amd, cjs, system, umd).","created_at":"2015-05-08T15:08:21Z","updated_at":"2015-05-13T00:43:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d54aadece20f1b9841df05d7dcf2c7236b9583db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3085/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/40182f3b8cb69d2a5f71a279c8d1b2f2495104f5","head":{"label":"tinganho:nonInitExport","ref":"nonInitExport","sha":"40182f3b8cb69d2a5f71a279c8d1b2f2495104f5","user":{"login":"tinganho","id":1324476,"avatar_url":"https://avatars.githubusercontent.com/u/1324476?v=3","gravatar_id":"","url":"https://api.github.com/users/tinganho","html_url":"https://github.com/tinganho","followers_url":"https://api.github.com/users/tinganho/followers","following_url":"https://api.github.com/users/tinganho/following{/other_user}","gists_url":"https://api.github.com/users/tinganho/gists{/gist_id}","starred_url":"https://api.github.com/users/tinganho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinganho/subscriptions","organizations_url":"https://api.github.com/users/tinganho/orgs","repos_url":"https://api.github.com/users/tinganho/repos","events_url":"https://api.github.com/users/tinganho/events{/privacy}","received_events_url":"https://api.github.com/users/tinganho/received_events","type":"User","site_admin":false},"repo":{"id":31378465,"name":"TypeScript","full_name":"tinganho/TypeScript","owner":{"login":"tinganho","id":1324476,"avatar_url":"https://avatars.githubusercontent.com/u/1324476?v=3","gravatar_id":"","url":"https://api.github.com/users/tinganho","html_url":"https://github.com/tinganho","followers_url":"https://api.github.com/users/tinganho/followers","following_url":"https://api.github.com/users/tinganho/following{/other_user}","gists_url":"https://api.github.com/users/tinganho/gists{/gist_id}","starred_url":"https://api.github.com/users/tinganho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinganho/subscriptions","organizations_url":"https://api.github.com/users/tinganho/orgs","repos_url":"https://api.github.com/users/tinganho/repos","events_url":"https://api.github.com/users/tinganho/events{/privacy}","received_events_url":"https://api.github.com/users/tinganho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tinganho/TypeScript","description":"TypeScript is a superset of JavaScript that compiles to clean JavaScript output.","fork":true,"url":"https://api.github.com/repos/tinganho/TypeScript","forks_url":"https://api.github.com/repos/tinganho/TypeScript/forks","keys_url":"https://api.github.com/repos/tinganho/TypeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tinganho/TypeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tinganho/TypeScript/teams","hooks_url":"https://api.github.com/repos/tinganho/TypeScript/hooks","issue_events_url":"https://api.github.com/repos/tinganho/TypeScript/issues/events{/number}","events_url":"https://api.github.com/repos/tinganho/TypeScript/events","assignees_url":"https://api.github.com/repos/tinganho/TypeScript/assignees{/user}","branches_url":"https://api.github.com/repos/tinganho/TypeScript/branches{/branch}","tags_url":"https://api.github.com/repos/tinganho/TypeScript/tags","blobs_url":"https://api.github.com/repos/tinganho/TypeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tinganho/TypeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tinganho/TypeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/tinganho/TypeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tinganho/TypeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/tinganho/TypeScript/languages","stargazers_url":"https://api.github.com/repos/tinganho/TypeScript/stargazers","contributors_url":"https://api.github.com/repos/tinganho/TypeScript/contributors","subscribers_url":"https://api.github.com/repos/tinganho/TypeScript/subscribers","subscription_url":"https://api.github.com/repos/tinganho/TypeScript/subscription","commits_url":"https://api.github.com/repos/tinganho/TypeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/tinganho/TypeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/tinganho/TypeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/tinganho/TypeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/tinganho/TypeScript/contents/{+path}","compare_url":"https://api.github.com/repos/tinganho/TypeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tinganho/TypeScript/merges","archive_url":"https://api.github.com/repos/tinganho/TypeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tinganho/TypeScript/downloads","issues_url":"https://api.github.com/repos/tinganho/TypeScript/issues{/number}","pulls_url":"https://api.github.com/repos/tinganho/TypeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/tinganho/TypeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/tinganho/TypeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tinganho/TypeScript/labels{/name}","releases_url":"https://api.github.com/repos/tinganho/TypeScript/releases{/id}","created_at":"2015-02-26T17:12:03Z","updated_at":"2015-05-05T06:48:45Z","pushed_at":"2015-05-12T11:38:26Z","git_url":"git://github.com/tinganho/TypeScript.git","ssh_url":"git@github.com:tinganho/TypeScript.git","clone_url":"https://github.com/tinganho/TypeScript.git","svn_url":"https://github.com/tinganho/TypeScript","homepage":"http://www.typescriptlang.org","size":148553,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"18c65da36ab7e0f2b6a0fd4a9258c8bbe6ce09c4","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}","created_at":"2014-06-17T15:28:39Z","updated_at":"2015-05-12T23:57:24Z","pushed_at":"2015-05-13T00:22:11Z","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":768723,"stargazers_count":5122,"watchers_count":5122,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":535,"mirror_url":null,"open_issues_count":614,"forks":535,"open_issues":614,"watchers":5122,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/3085"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/3085"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/3085/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/3085/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript/statuses/40182f3b8cb69d2a5f71a279c8d1b2f2495104f5"}}}}