@@ -275,7 +275,7 @@ namespace ts.server {
275275 removeRoot ( info : ScriptInfo ) {
276276 if ( this . filenameToScript . contains ( info . path ) ) {
277277 this . filenameToScript . remove ( info . path ) ;
278- removeItem ( info , this . roots ) ;
278+ unorderedRemoveItem ( info , this . roots ) ;
279279 this . resolvedModuleNames . remove ( info . path ) ;
280280 this . resolvedTypeReferenceDirectives . remove ( info . path ) ;
281281 }
@@ -849,7 +849,7 @@ namespace ts.server {
849849 project . directoryWatcher . close ( ) ;
850850 forEachValue ( project . directoriesWatchedForWildcards , watcher => { watcher . close ( ) ; } ) ;
851851 delete project . directoriesWatchedForWildcards ;
852- removeItem ( project , this . configuredProjects ) ;
852+ unorderedRemoveItem ( project , this . configuredProjects ) ;
853853 }
854854 else {
855855 for ( const directory of project . directoriesWatchedForTsconfig ) {
@@ -861,7 +861,7 @@ namespace ts.server {
861861 delete project . projectService . directoryWatchersForTsconfig [ directory ] ;
862862 }
863863 }
864- removeItem ( project , this . inferredProjects ) ;
864+ unorderedRemoveItem ( project , this . inferredProjects ) ;
865865 }
866866
867867 const fileNames = project . getFileNames ( ) ;
@@ -986,7 +986,7 @@ namespace ts.server {
986986 }
987987 }
988988 else {
989- removeItem ( info , this . openFilesReferenced ) ;
989+ unorderedRemoveItem ( info , this . openFilesReferenced ) ;
990990 }
991991 info . close ( ) ;
992992 }
@@ -1496,13 +1496,13 @@ namespace ts.server {
14961496 // openFileRoots or openFileReferenced.
14971497 if ( info . isOpen ) {
14981498 if ( this . openFileRoots . indexOf ( info ) >= 0 ) {
1499- removeItem ( info , this . openFileRoots ) ;
1499+ unorderedRemoveItem ( info , this . openFileRoots ) ;
15001500 if ( info . defaultProject && ! info . defaultProject . isConfiguredProject ( ) ) {
15011501 this . removeProject ( info . defaultProject ) ;
15021502 }
15031503 }
15041504 if ( this . openFilesReferenced . indexOf ( info ) >= 0 ) {
1505- removeItem ( info , this . openFilesReferenced ) ;
1505+ unorderedRemoveItem ( info , this . openFilesReferenced ) ;
15061506 }
15071507 this . openFileRootsConfigured . push ( info ) ;
15081508 info . defaultProject = project ;
0 commit comments