Skip to content

Commit 4513ae3

Browse files
authored
disable CoS for inferred projects (microsoft#11909)
1 parent d32c526 commit 4513ae3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/server/editorServices.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ namespace ts.server {
10081008
const useExistingProject = this.useSingleInferredProject && this.inferredProjects.length;
10091009
const project = useExistingProject
10101010
? this.inferredProjects[0]
1011-
: new InferredProject(this, this.documentRegistry, /*languageServiceEnabled*/ true, this.compilerOptionsForInferredProjects, /*compileOnSaveEnabled*/ this.compileOnSaveForInferredProjects);
1011+
: new InferredProject(this, this.documentRegistry, /*languageServiceEnabled*/ true, this.compilerOptionsForInferredProjects);
10121012

10131013
project.addRoot(root);
10141014

src/server/project.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -666,14 +666,14 @@ namespace ts.server {
666666
// Used to keep track of what directories are watched for this project
667667
directoriesWatchedForTsconfig: string[] = [];
668668

669-
constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, languageServiceEnabled: boolean, compilerOptions: CompilerOptions, public compileOnSaveEnabled: boolean) {
669+
constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, languageServiceEnabled: boolean, compilerOptions: CompilerOptions) {
670670
super(ProjectKind.Inferred,
671671
projectService,
672672
documentRegistry,
673673
/*files*/ undefined,
674674
languageServiceEnabled,
675675
compilerOptions,
676-
compileOnSaveEnabled);
676+
/*compileOnSaveEnabled*/ false);
677677

678678
this.inferredProjectName = makeInferredProjectName(InferredProject.NextId);
679679
InferredProject.NextId++;

0 commit comments

Comments
 (0)