@@ -35,10 +35,10 @@ namespace ts.server {
3535 }
3636
3737 interface OpenConfigFileResult {
38- success : boolean ,
39- errors ?: Diagnostic [ ]
38+ success : boolean ;
39+ errors ?: Diagnostic [ ] ;
4040
41- project ?: ConfiguredProject ,
41+ project ?: ConfiguredProject ;
4242 }
4343
4444 interface OpenConfiguredProjectResult {
@@ -304,23 +304,23 @@ namespace ts.server {
304304 }
305305
306306 // TODO: delete if unused
307- private releaseNonReferencedConfiguredProjects ( ) {
308- if ( this . configuredProjects . every ( p => p . openRefCount > 0 ) ) {
309- return ;
310- }
311-
312- const configuredProjects : ConfiguredProject [ ] = [ ] ;
313- for ( const proj of this . configuredProjects ) {
314- if ( proj . openRefCount > 0 ) {
315- configuredProjects . push ( proj ) ;
316- }
317- else {
318- proj . close ( ) ;
319- }
320- }
321-
322- this . configuredProjects = configuredProjects ;
323- }
307+ // private releaseNonReferencedConfiguredProjects() {
308+ // if (this.configuredProjects.every(p => p.openRefCount > 0)) {
309+ // return;
310+ // }
311+
312+ // const configuredProjects: ConfiguredProject[] = [];
313+ // for (const proj of this.configuredProjects) {
314+ // if (proj.openRefCount > 0) {
315+ // configuredProjects.push(proj);
316+ // }
317+ // else {
318+ // proj.close();
319+ // }
320+ // }
321+
322+ // this.configuredProjects = configuredProjects;
323+ // }
324324
325325 private removeProject ( project : Project ) {
326326 this . log ( `remove project: ${ project . getRootFiles ( ) . toString ( ) } ` ) ;
@@ -540,7 +540,7 @@ namespace ts.server {
540540 return ;
541541 }
542542 this . logger . startGroup ( ) ;
543-
543+
544544 let counter = 0 ;
545545 counter = printProjects ( this . externalProjects , counter ) ;
546546 counter = printProjects ( this . configuredProjects , counter ) ;
@@ -636,10 +636,10 @@ namespace ts.server {
636636
637637 private createAndAddExternalProject ( projectFileName : string , files : string [ ] , compilerOptions : CompilerOptions ) {
638638 const project = new ExternalProject (
639- projectFileName ,
640- this ,
641- this . documentRegistry ,
642- compilerOptions ,
639+ projectFileName ,
640+ this ,
641+ this . documentRegistry ,
642+ compilerOptions ,
643643 /*languageServiceEnabled*/ ! this . exceededTotalSizeLimitForNonTsFiles ( compilerOptions , files ) ) ;
644644
645645 const errors = this . addFilesToProjectAndUpdateGraph ( project , files , /*clientFileName*/ undefined ) ;
@@ -648,7 +648,7 @@ namespace ts.server {
648648 }
649649
650650 private createAndAddConfiguredProject ( configFileName : NormalizedPath , projectOptions : ProjectOptions , clientFileName ?: string ) {
651- const sizeLimitExceeded = ! this . exceededTotalSizeLimitForNonTsFiles ( projectOptions . compilerOptions , projectOptions . files ) ;
651+ const sizeLimitExceeded = this . exceededTotalSizeLimitForNonTsFiles ( projectOptions . compilerOptions , projectOptions . files ) ;
652652 const project = new ConfiguredProject (
653653 configFileName ,
654654 this ,
@@ -665,7 +665,7 @@ namespace ts.server {
665665 this . watchConfigDirectoryForProject ( project , projectOptions ) ;
666666 }
667667 project . watchWildcards ( ( project , path ) => this . onSourceFileInDirectoryChangedForConfiguredProject ( project , path ) ) ;
668-
668+
669669 this . configuredProjects . push ( project ) ;
670670 return { project, errors } ;
671671 }
@@ -902,7 +902,7 @@ namespace ts.server {
902902 const openFileRootsConfigured : ScriptInfo [ ] = [ ] ;
903903 // collect all orphanted script infos that used to be roots of configured projects
904904 for ( const info of this . openFileRootsConfigured ) {
905- if ( info . containingProjects . length === 0 ) {
905+ if ( info . containingProjects . length === 0 ) {
906906 unattachedOpenFiles . push ( info ) ;
907907 }
908908 else {
@@ -999,7 +999,6 @@ namespace ts.server {
999999 // const rootedProject = rootFile.defaultProject;
10001000 // const referencingProjects = this.findReferencingProjects(rootFile, rootedProject);
10011001
1002-
10031002 // if (rootFile.defaultProject && rootFile.defaultProject.projectKind !== ProjectKind.Inferred) {
10041003 // // If the root file has already been added into a configured project,
10051004 // // meaning the original inferred project is gone already.
0 commit comments