{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/44995904","id":44995904,"diff_hunk":"@@ -1885,15 +1887,85 @@ namespace ts {\n         return emitOutputFilePathWithoutExtension + extension;\r\n     }\r\n \r\n+    export function getEmitScriptTarget(compilerOptions: CompilerOptions) {\r\n+        return compilerOptions.target || ScriptTarget.ES3;\r\n+    }\r\n+\r\n+    export function getEmitModuleKind(compilerOptions: CompilerOptions) {\r\n+        return compilerOptions.module ?\r\n+            compilerOptions.module :\r\n+            getEmitScriptTarget(compilerOptions) === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None;\r\n+    }\r\n+\r\n+    export interface EmitFileNames {\r\n+        jsFilePath: string;\r\n+        sourceMapFilePath: string;\r\n+        declarationFilePath: string;\r\n+    }\r\n+\r\n+    export function forEachExpectedEmitFile(host: EmitHost,\r","path":"src/compiler/utilities.ts","position":29,"original_position":29,"commit_id":"073b69aaf57ccc78201ad80b97453cfcc207a9f9","original_commit_id":"073b69aaf57ccc78201ad80b97453cfcc207a9f9","user":{"login":"vladima","id":8052307,"avatar_url":"https://avatars.githubusercontent.com/u/8052307?v=3","gravatar_id":"","url":"https://api.github.com/users/vladima","html_url":"https://github.com/vladima","followers_url":"https://api.github.com/users/vladima/followers","following_url":"https://api.github.com/users/vladima/following{/other_user}","gists_url":"https://api.github.com/users/vladima/gists{/gist_id}","starred_url":"https://api.github.com/users/vladima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladima/subscriptions","organizations_url":"https://api.github.com/users/vladima/orgs","repos_url":"https://api.github.com/users/vladima/repos","events_url":"https://api.github.com/users/vladima/events{/privacy}","received_events_url":"https://api.github.com/users/vladima/received_events","type":"User","site_admin":false},"body":"I think this function needs a better name. To me `forEach` implies that this function will \r\n- have a callback parameter and this callback will accept one file as an argument\r\n- this callback will be invoked for every file in the list (probably module some filtering).","created_at":"2015-11-16T22:41:45Z","updated_at":"2015-11-16T22:41:45Z","html_url":"https://github.com/Microsoft/TypeScript/pull/5471#discussion_r44995904","pull_request_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments/44995904"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/5471#discussion_r44995904"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471","id":49311921,"html_url":"https://github.com/Microsoft/TypeScript/pull/5471","diff_url":"https://github.com/Microsoft/TypeScript/pull/5471.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/5471.patch","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5471","number":5471,"state":"open","locked":false,"title":"Compilation of Js Files","user":{"login":"sheetalkamat","id":8052792,"avatar_url":"https://avatars.githubusercontent.com/u/8052792?v=3","gravatar_id":"","url":"https://api.github.com/users/sheetalkamat","html_url":"https://github.com/sheetalkamat","followers_url":"https://api.github.com/users/sheetalkamat/followers","following_url":"https://api.github.com/users/sheetalkamat/following{/other_user}","gists_url":"https://api.github.com/users/sheetalkamat/gists{/gist_id}","starred_url":"https://api.github.com/users/sheetalkamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheetalkamat/subscriptions","organizations_url":"https://api.github.com/users/sheetalkamat/orgs","repos_url":"https://api.github.com/users/sheetalkamat/repos","events_url":"https://api.github.com/users/sheetalkamat/events{/privacy}","received_events_url":"https://api.github.com/users/sheetalkamat/received_events","type":"User","site_admin":false},"body":"Changes same as #5345 with few modifications and against master \r\nHere is the list of items this PR supports:\r\n- [x] Allow javascript files to be compiled on command line or through references/imports\r\n- [x] tsconfig.json can take javascript files as file names to be compiled\r\n- [x] If filenames are not specified in tsconfig.json, javascript files in the folder and not part of compilation\r\n- [x] compiler options now have a flag named \"allowJs\" which when true will pick up javascript files in the folder for compilation if tscconfig.json doesn't supply file name list\r\n- [x] Moved reporting of usage of typescript syntax in javascript file from services to compiler\r\n- [x] Reports error if output is overwriting any of the input files (#4424)\r\n- [x] Reports error if output is not unique location and multiple input files overwrite same output file (#4424)\r\n- [x] .ts, .tsx and .d.ts files take precedence over .js files when creating list of files for compilation\r\n- [x] Project runner options cleanup\r\n- [x] Project runner to accept tsconfig.json tests\r\n- [x] Bundle js files into --out and copy into --outDir\r\n- [x] Transpilation of javascript files\r\n- [x] JavaScript files do not emit declaration files and it is error to specify --allowJs and --declaration together","created_at":"2015-10-30T19:23:08Z","updated_at":"2015-11-16T22:41:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd680def876950675a331de20a8e12c9bb76f6f7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471/commits","review_comments_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471/comments","review_comment_url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5471/comments","statuses_url":"https://api.github.com/repos/Microsoft/TypeScript/statuses/073b69aaf57ccc78201ad80b97453cfcc207a9f9","head":{"label":"Microsoft:jsFileCompilation","ref":"jsFileCompilation","sha":"073b69aaf57ccc78201ad80b97453cfcc207a9f9","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-11-16T21:26:05Z","pushed_at":"2015-11-16T21:32:52Z","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":405729,"stargazers_count":7575,"watchers_count":7575,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":872,"mirror_url":null,"open_issues_count":913,"forks":872,"open_issues":913,"watchers":7575,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"f168962c8d508ad1b86b19b9591fcf9d6c729a61","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-11-16T21:26:05Z","pushed_at":"2015-11-16T21:32:52Z","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":405729,"stargazers_count":7575,"watchers_count":7575,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":872,"mirror_url":null,"open_issues_count":913,"forks":872,"open_issues":913,"watchers":7575,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471"},"html":{"href":"https://github.com/Microsoft/TypeScript/pull/5471"},"issue":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/5471"},"comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/issues/5471/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/TypeScript/pulls/5471/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/TypeScript/statuses/073b69aaf57ccc78201ad80b97453cfcc207a9f9"}}}}