Renames as per PR feedback
This commit is contained in:
parent
d64f2483e4
commit
7c5f5249ae
|
@ -99,7 +99,7 @@ namespace ts.server {
|
||||||
/*@internal*/
|
/*@internal*/
|
||||||
lastCachedUnresolvedImportsList: SortedReadonlyArray<string>;
|
lastCachedUnresolvedImportsList: SortedReadonlyArray<string>;
|
||||||
/*@internal*/
|
/*@internal*/
|
||||||
private hasMoreOrLessFiles = false;
|
private hasAddedorRemovedFiles = false;
|
||||||
|
|
||||||
private lastFileExceededProgramSize: string | undefined;
|
private lastFileExceededProgramSize: string | undefined;
|
||||||
|
|
||||||
|
@ -777,8 +777,8 @@ namespace ts.server {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @internal */
|
/* @internal */
|
||||||
setHasMoreOrLessFiles() {
|
onFileAddedOrRemoved() {
|
||||||
this.hasMoreOrLessFiles = true;
|
this.hasAddedorRemovedFiles = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -789,8 +789,8 @@ namespace ts.server {
|
||||||
this.resolutionCache.startRecordingFilesWithChangedResolutions();
|
this.resolutionCache.startRecordingFilesWithChangedResolutions();
|
||||||
|
|
||||||
const hasNewProgram = this.updateGraphWorker();
|
const hasNewProgram = this.updateGraphWorker();
|
||||||
const hasMoreOrLessFiles = this.hasMoreOrLessFiles;
|
const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles;
|
||||||
this.hasMoreOrLessFiles = false;
|
this.hasAddedorRemovedFiles = false;
|
||||||
|
|
||||||
const changedFiles: ReadonlyArray<Path> = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || emptyArray;
|
const changedFiles: ReadonlyArray<Path> = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || emptyArray;
|
||||||
|
|
||||||
|
@ -820,7 +820,7 @@ namespace ts.server {
|
||||||
this.lastCachedUnresolvedImportsList = result ? toDeduplicatedSortedArray(result) : emptyArray;
|
this.lastCachedUnresolvedImportsList = result ? toDeduplicatedSortedArray(result) : emptyArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.projectService.typingsCache.enqueueInstallTypingsForProject(this, this.lastCachedUnresolvedImportsList, hasMoreOrLessFiles);
|
this.projectService.typingsCache.enqueueInstallTypingsForProject(this, this.lastCachedUnresolvedImportsList, hasAddedorRemovedFiles);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.lastCachedUnresolvedImportsList = undefined;
|
this.lastCachedUnresolvedImportsList = undefined;
|
||||||
|
|
|
@ -304,7 +304,7 @@ namespace ts.server {
|
||||||
const isNew = !this.isAttached(project);
|
const isNew = !this.isAttached(project);
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
this.containingProjects.push(project);
|
this.containingProjects.push(project);
|
||||||
project.setHasMoreOrLessFiles();
|
project.onFileAddedOrRemoved();
|
||||||
if (!project.getCompilerOptions().preserveSymlinks) {
|
if (!project.getCompilerOptions().preserveSymlinks) {
|
||||||
this.ensureRealPath();
|
this.ensureRealPath();
|
||||||
}
|
}
|
||||||
|
@ -329,23 +329,23 @@ namespace ts.server {
|
||||||
return;
|
return;
|
||||||
case 1:
|
case 1:
|
||||||
if (this.containingProjects[0] === project) {
|
if (this.containingProjects[0] === project) {
|
||||||
project.setHasMoreOrLessFiles();
|
project.onFileAddedOrRemoved();
|
||||||
this.containingProjects.pop();
|
this.containingProjects.pop();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (this.containingProjects[0] === project) {
|
if (this.containingProjects[0] === project) {
|
||||||
project.setHasMoreOrLessFiles();
|
project.onFileAddedOrRemoved();
|
||||||
this.containingProjects[0] = this.containingProjects.pop();
|
this.containingProjects[0] = this.containingProjects.pop();
|
||||||
}
|
}
|
||||||
else if (this.containingProjects[1] === project) {
|
else if (this.containingProjects[1] === project) {
|
||||||
project.setHasMoreOrLessFiles();
|
project.onFileAddedOrRemoved();
|
||||||
this.containingProjects.pop();
|
this.containingProjects.pop();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (unorderedRemoveItem(this.containingProjects, project)) {
|
if (unorderedRemoveItem(this.containingProjects, project)) {
|
||||||
project.setHasMoreOrLessFiles();
|
project.onFileAddedOrRemoved();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue