CR changes

This commit is contained in:
Ryan Cavanaugh
2016-06-13 10:15:29 -07:00
parent e8ac1abbd6
commit 6702e651a3
3 changed files with 19 additions and 4 deletions

View File

@@ -1031,7 +1031,9 @@ namespace ts {
// Walk the primary type lookup locations
let result: string[] = [];
if (host.directoryExists && host.getDirectories) {
for (const root of options.typeRoots || defaultTypeRoots) {
const typeRoots = options.typeRoots ||
defaultTypeRoots.map(d => combinePaths(options.configFilePath ? getDirectoryPath(options.configFilePath) : host.getCurrentDirectory(), d));
for (const root of typeRoots) {
if (host.directoryExists(root)) {
result = result.concat(host.getDirectories(root));
}