@@ -1759,19 +1759,14 @@ namespace ts {
17591759 } ;
17601760 }
17611761
1762- export function getExtensionsToRemoveForEmitPath ( compilerOptons : CompilerOptions ) {
1763- return getSupportedExtensions ( compilerOptons ) . concat ( "jsx" , "js" ) ;
1764- }
1765-
17661762 export function getOwnEmitOutputFilePath ( sourceFile : SourceFile , host : EmitHost , extension : string ) {
17671763 let compilerOptions = host . getCompilerOptions ( ) ;
17681764 let emitOutputFilePathWithoutExtension : string ;
17691765 if ( compilerOptions . outDir ) {
1770- emitOutputFilePathWithoutExtension = removeFileExtension ( getSourceFilePathInNewDir ( sourceFile , host , compilerOptions . outDir ) ,
1771- getExtensionsToRemoveForEmitPath ( compilerOptions ) ) ;
1766+ emitOutputFilePathWithoutExtension = removeFileExtension ( getSourceFilePathInNewDir ( sourceFile , host , compilerOptions . outDir ) ) ;
17721767 }
17731768 else {
1774- emitOutputFilePathWithoutExtension = removeFileExtension ( sourceFile . fileName , getExtensionsToRemoveForEmitPath ( compilerOptions ) ) ;
1769+ emitOutputFilePathWithoutExtension = removeFileExtension ( sourceFile . fileName ) ;
17751770 }
17761771
17771772 return emitOutputFilePathWithoutExtension + extension ;
@@ -1816,7 +1811,7 @@ namespace ts {
18161811 }
18171812
18181813 function getDeclarationEmitFilePath ( jsFilePath : string , options : CompilerOptions ) {
1819- return options . declaration ? removeFileExtension ( jsFilePath , getExtensionsToRemoveForEmitPath ( options ) ) + ".d.ts" : undefined ;
1814+ return options . declaration ? removeFileExtension ( jsFilePath ) + ".d.ts" : undefined ;
18201815 }
18211816
18221817 export function hasFile ( sourceFiles : SourceFile [ ] , fileName : string ) {
@@ -2144,7 +2139,7 @@ namespace ts {
21442139
21452140 export function isJavaScript ( fileName : string ) {
21462141 // Treat file as typescript if the extension is not supportedTypeScript
2147- return hasExtension ( fileName ) && ! forEach ( supportedTypeScriptExtensions , extension => fileExtensionIs ( fileName , extension ) ) ;
2142+ return hasExtension ( fileName ) && forEach ( supportedJavascriptExtensions , extension => fileExtensionIs ( fileName , extension ) ) ;
21482143 }
21492144
21502145 export function isTsx ( fileName : string ) {
0 commit comments