Default type roots when host.directoryExists is not implemented should be node_modules/@types, not just node_modules

This commit is contained in:
Andy Hanson 2016-09-02 13:29:51 -07:00
parent 85a13b88ea
commit 2d60a20b6f

View File

@ -188,7 +188,7 @@ namespace ts {
*/
function getDefaultTypeRoots(currentDirectory: string, host: ModuleResolutionHost): string[] | undefined {
if (!host.directoryExists) {
return [combinePaths(currentDirectory, "node_modules")];
return [combinePaths(currentDirectory, nodeModulesAtTypes)];
// And if it doesn't exist, tough.
}