Cleanup
This commit is contained in:
parent
2612a74f63
commit
6de3dc4f8b
|
@ -394,13 +394,11 @@ namespace ts.server {
|
|||
const newRootFiles = projectOptions.files.map((f => this.getCanonicalFileName(f)));
|
||||
const currentRootFiles = project.getRootFiles().map((f => this.getCanonicalFileName(f)));
|
||||
const lastUpdateTypesRoot: number = Math.max.apply(Math, project.getEffectiveTypeRoots().map(root => {
|
||||
this.logger.info('Compute for ' + root);
|
||||
if (this.host.directoryExists(root)) {
|
||||
return +this.host.getModifiedTime(root);
|
||||
}
|
||||
return 0;
|
||||
}));
|
||||
this.logger.info('Last type roots update = ' + lastUpdateTypesRoot + ', last was ' + project.lastUpdatedTypesRootTime);
|
||||
|
||||
// We check if the project file list has changed. If so, we update the project.
|
||||
if (!arrayIsEqualTo(currentRootFiles.sort(), newRootFiles.sort()) || (lastUpdateTypesRoot > project.lastUpdatedTypesRootTime)) {
|
||||
|
@ -794,7 +792,7 @@ namespace ts.server {
|
|||
}
|
||||
|
||||
private watchConfigDirectoryForProject(project: ConfiguredProject, options: ProjectOptions): void {
|
||||
if (!options.configHasFilesProperty || (options.compilerOptions.types === undefined)) {
|
||||
if (!options.configHasFilesProperty) {
|
||||
project.watchConfigDirectory((project, path) => this.onSourceFileInDirectoryChangedForConfiguredProject(project, path));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -612,7 +612,6 @@ namespace ts.server {
|
|||
|
||||
watchTypeRoots(callback: (project: ConfiguredProject, path: string) => void) {
|
||||
const roots = ts.getEffectiveTypeRoots(this.getCompilerOptions(), this.projectService.host);
|
||||
this.projectService.logger.info(`Add type roots watchers for: ${roots}`);
|
||||
const watchers: FileWatcher[] = [];
|
||||
if (roots) {
|
||||
for (const root of roots) {
|
||||
|
|
Loading…
Reference in a new issue