Pass the right host to getEffectiveTyperoots

This commit is contained in:
Richard Knoll
2016-09-06 12:46:27 -07:00
parent a26d3108c2
commit 8f0c7ef6c7

View File

@@ -225,7 +225,7 @@ namespace ts {
traceEnabled
};
const typeRoots = getEffectiveTypeRoots(options, host.getCurrentDirectory && host.getCurrentDirectory());
const typeRoots = getEffectiveTypeRoots(options, host);
if (traceEnabled) {
if (containingFile === undefined) {
if (typeRoots === undefined) {
@@ -1086,7 +1086,7 @@ namespace ts {
// Walk the primary type lookup locations
const result: string[] = [];
if (host.directoryExists && host.getDirectories) {
const typeRoots = getEffectiveTypeRoots(options, host.getCurrentDirectory && host.getCurrentDirectory());
const typeRoots = getEffectiveTypeRoots(options, host);
if (typeRoots) {
for (const root of typeRoots) {
if (host.directoryExists(root)) {