mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Added gc of configured projects to handle case in which file is opened
in directory configured by tsconfig.json, but file not part of the configured project.
This commit is contained in:
parent
8798235c68
commit
ae4f164eb2
@ -508,6 +508,16 @@ module ts.server {
|
||||
this.printProjects();
|
||||
}
|
||||
|
||||
gcConfiguredProjects() {
|
||||
var configuredProjects: Project[] = [];
|
||||
for (var i = 0, len = this.configuredProjects.length; i < len; i++) {
|
||||
if (this.configuredProjects[i].openRefCount > 0) {
|
||||
configuredProjects.push(this.configuredProjects[i]);
|
||||
}
|
||||
}
|
||||
this.configuredProjects = configuredProjects;
|
||||
}
|
||||
|
||||
setConfiguredProjectRoot(info: ScriptInfo) {
|
||||
for (var i = 0, len = this.configuredProjects.length; i < len; i++) {
|
||||
let configuredProject = this.configuredProjects[i];
|
||||
@ -555,6 +565,7 @@ module ts.server {
|
||||
this.openFileRoots.push(info);
|
||||
}
|
||||
}
|
||||
this.gcConfiguredProjects();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user