Provide realpath for module resolution in LSHost

This commit is contained in:
Andy Hanson 2016-08-01 06:43:53 -07:00
parent 6c6de2a3e2
commit cb1ea7be5d

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>(