Skip to content

Commit

Permalink
Merge pull request microsoft#12232 from Microsoft/removeJSFromVSResol…
Browse files Browse the repository at this point in the history
…utions

Remove js from vs resolutions
  • Loading branch information
mhegazy authored Nov 14, 2016
2 parents 2827b37 + 964f9c5 commit 6a67f80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/services/shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1060,8 +1060,15 @@ namespace ts {
return this.forwardJSONCall(`resolveModuleName('${fileName}')`, () => {
const compilerOptions = <CompilerOptions>JSON.parse(compilerOptionsJson);
const result = resolveModuleName(moduleName, normalizeSlashes(fileName), compilerOptions, this.host);
const resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
if (resolvedFileName && !compilerOptions.allowJs && fileExtensionIs(resolvedFileName, ".js")) {
return {
resolvedFileName: undefined,
failedLookupLocations: []
};
}
return {
resolvedFileName: result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined,
resolvedFileName,
failedLookupLocations: result.failedLookupLocations
};
});
Expand Down
3 changes: 2 additions & 1 deletion src/services/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"declaration": true,
"target": "es5",
"noUnusedLocals": true,
"noUnusedParameters": true
"noUnusedParameters": true,
"types": []
},
"files": [
"../compiler/core.ts",
Expand Down

0 comments on commit 6a67f80

Please sign in to comment.