[in progress] project system work - versions

This commit is contained in:
Vladimir Matveev
2016-06-22 16:51:09 -07:00
parent c9b82eddda
commit c8d37dc87e
7 changed files with 354 additions and 317 deletions

View File

@@ -37,17 +37,13 @@ namespace ts.server {
}
detachFromProject(project: Project) {
const index = this.containingProjects.indexOf(project);
if (index < 0) {
// TODO: (assert?) attempt to detach file from project that didn't include this file
return;
}
removeItemFromSet(this.containingProjects, project);
}
detachAllProjects() {
for (const p of this.containingProjects) {
p.removeFile(this);
// detach is unnecessary since we'll clean the list of containing projects anyways
p.removeFile(this, /*detachFromProjects*/ false);
}
this.containingProjects.length = 0;
}