Skip to content

Commit 2d60a20

Browse files
author
Andy Hanson
committed
Default type roots when host.directoryExists is not implemented should be node_modules/@types, not just node_modules
1 parent 85a13b8 commit 2d60a20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ namespace ts {
188188
*/
189189
function getDefaultTypeRoots(currentDirectory: string, host: ModuleResolutionHost): string[] | undefined {
190190
if (!host.directoryExists) {
191-
return [combinePaths(currentDirectory, "node_modules")];
191+
return [combinePaths(currentDirectory, nodeModulesAtTypes)];
192192
// And if it doesn't exist, tough.
193193
}
194194

0 commit comments

Comments
 (0)