From 3bdad8a6b04a181257818e37a4779a9bc3eb8031 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 12 Nov 2015 14:25:46 -0800 Subject: [PATCH] When excluding same base name file from compilation, check for all supported javascript extensions instead of just .js --- src/compiler/commandLineParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 5336b01bb14..96b6bdeef94 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -517,7 +517,7 @@ namespace ts { // If this is one of the output extension (which would be .d.ts and .js if we are allowing compilation of js files) // do not include this file if we included .ts or .tsx file with same base name as it could be output of the earlier compilation - if (extension === ".d.ts" || (options.allowJs && extension === ".js")) { + if (extension === ".d.ts" || (options.allowJs && contains(supportedJavascriptExtensions, extension))) { const baseName = fileName.substr(0, fileName.length - extension.length); if (hasProperty(filesSeen, baseName + ".ts") || hasProperty(filesSeen, baseName + ".tsx")) { continue;