Merge pull request #24139 from minestarks/dynamicprojectassert

Normalize ProjectService.currentDirectory
This commit is contained in:
Mine Starks
2018-05-22 09:04:45 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -403,7 +403,7 @@ namespace ts.server {
/* @internal */
pendingEnsureProjectForOpenFiles: boolean;
readonly currentDirectory: string;
readonly currentDirectory: NormalizedPath;
readonly toCanonicalFileName: (f: string) => string;
public readonly host: ServerHost;
@@ -450,7 +450,7 @@ namespace ts.server {
if (this.host.realpath) {
this.realpathToScriptInfos = createMultiMap();
}
this.currentDirectory = this.host.getCurrentDirectory();
this.currentDirectory = toNormalizedPath(this.host.getCurrentDirectory());
this.toCanonicalFileName = createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation &&
ensureTrailingDirectorySeparator(this.toPath(this.typingsInstaller.globalTypingsCacheLocation));
+1 -1
View File
@@ -8176,7 +8176,7 @@ declare namespace ts.server {
private safelist;
private legacySafelist;
private pendingProjectUpdates;
readonly currentDirectory: string;
readonly currentDirectory: NormalizedPath;
readonly toCanonicalFileName: (f: string) => string;
readonly host: ServerHost;
readonly logger: Logger;