From 4513ae3034a21c728d610a74c39ab833646024e9 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 27 Oct 2016 18:00:21 -0700 Subject: [PATCH] disable CoS for inferred projects (#11909) --- src/server/editorServices.ts | 2 +- src/server/project.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 6565940c22d08..f80305efafa52 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1008,7 +1008,7 @@ namespace ts.server { const useExistingProject = this.useSingleInferredProject && this.inferredProjects.length; const project = useExistingProject ? this.inferredProjects[0] - : new InferredProject(this, this.documentRegistry, /*languageServiceEnabled*/ true, this.compilerOptionsForInferredProjects, /*compileOnSaveEnabled*/ this.compileOnSaveForInferredProjects); + : new InferredProject(this, this.documentRegistry, /*languageServiceEnabled*/ true, this.compilerOptionsForInferredProjects); project.addRoot(root); diff --git a/src/server/project.ts b/src/server/project.ts index 5f4f8d4049027..457f5e2b261df 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -666,14 +666,14 @@ namespace ts.server { // Used to keep track of what directories are watched for this project directoriesWatchedForTsconfig: string[] = []; - constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, languageServiceEnabled: boolean, compilerOptions: CompilerOptions, public compileOnSaveEnabled: boolean) { + constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, languageServiceEnabled: boolean, compilerOptions: CompilerOptions) { super(ProjectKind.Inferred, projectService, documentRegistry, /*files*/ undefined, languageServiceEnabled, compilerOptions, - compileOnSaveEnabled); + /*compileOnSaveEnabled*/ false); this.inferredProjectName = makeInferredProjectName(InferredProject.NextId); InferredProject.NextId++;