Always set allowNonTsExtensions for allowJs

This commit is contained in:
Jason Ramsay
2017-02-10 11:13:12 -08:00
parent 2fc634f460
commit 3480fcc69a
2 changed files with 111 additions and 2 deletions
+2 -2
View File
@@ -165,8 +165,8 @@ namespace ts.server {
this.compilerOptions.allowNonTsExtensions = true;
this.compilerOptions.allowJs = true;
}
else if (hasExplicitListOfFiles) {
// If files are listed explicitly, allow all extensions
else if (hasExplicitListOfFiles || this.compilerOptions.allowJs) {
// If files are listed explicitly or allowJs is specified, allow all extensions
this.compilerOptions.allowNonTsExtensions = true;
}