Provide realpath for module resolution in LSHost

This commit is contained in:
Andy Hanson 2016-08-01 10:30:10 -07:00
parent d98846bd53
commit 5fb2fbd33c

View File

@ -115,6 +115,9 @@ namespace ts.server {
readFile: fileName => this.host.readFile(fileName),
directoryExists: directoryName => this.host.directoryExists(directoryName)
};
if (this.host.realpath) {
this.moduleResolutionHost.realpath = path => this.host.realpath(path);
}
}
private resolveNamesWithLocalCache<T extends Timestamped & { failedLookupLocations: string[] }, R>(