Skip to content

Commit 7378b8a

Browse files
authored
Fixing default typeRoots on Windows
Without this function ignores "\"
1 parent 2711303 commit 7378b8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/moduleNameResolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ namespace ts {
144144
}
145145

146146
let typeRoots: string[];
147-
forEachAncestorDirectory(currentDirectory, directory => {
147+
forEachAncestorDirectory(ts.normalizePath(currentDirectory), directory => {
148148
const atTypes = combinePaths(directory, nodeModulesAtTypes);
149149
if (host.directoryExists(atTypes)) {
150150
(typeRoots || (typeRoots = [])).push(atTypes);
@@ -1056,4 +1056,4 @@ namespace ts {
10561056
directory = parentPath;
10571057
}
10581058
}
1059-
}
1059+
}

0 commit comments

Comments
 (0)