Use the module cache to resolve non relative module name as well

This commit is contained in:
Sheetal Nandi
2018-02-22 11:09:23 -08:00
parent 403b7d8604
commit fdb5e95f0a
17 changed files with 77 additions and 37 deletions

View File

@@ -210,6 +210,9 @@ namespace ts.server {
/*@internal*/
public directoryStructureHost: DirectoryStructureHost;
/*@internal*/
public readonly getCanonicalFileName: GetCanonicalFileName;
/*@internal*/
constructor(
/*@internal*/readonly projectName: string,
@@ -224,6 +227,7 @@ namespace ts.server {
currentDirectory: string | undefined) {
this.directoryStructureHost = directoryStructureHost;
this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory || "");
this.getCanonicalFileName = this.projectService.toCanonicalFileName;
this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);
if (!this.compilerOptions) {