Use fs.watch for all directory watchers and some bug fixes

This commit is contained in:
zhengbli
2015-10-05 14:07:51 -07:00
parent 9db53f23cf
commit 7741ec0999
3 changed files with 15 additions and 25 deletions

View File

@@ -927,7 +927,7 @@ namespace ts.server {
var rootedProject = rootFile.defaultProject;
var referencingProjects = this.findReferencingProjects(rootFile, rootedProject);
if (rootFile.defaultProject.isConfiguredProject()) {
if (rootFile.defaultProject && rootFile.defaultProject.isConfiguredProject()) {
// If the root file has already been added into a configured project,
// meaning the original inferred project is gone already.
if (!rootedProject.isConfiguredProject()) {

View File

@@ -779,6 +779,7 @@ namespace ts.server {
}
private closeClientFile(fileName: string) {
if (!fileName) { return; }
var file = ts.normalizePath(fileName);
this.projectService.closeClientFile(file);
}