mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
[in progress] project system work - versions
This commit is contained in:
1 parent
c9b82eddda
commit
c8d37dc87e
7 files changed
+354
-317
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user