Rename and consolidate map iteration helpers

This commit is contained in:
Andy Hanson
2016-12-28 09:16:38 -08:00
parent 39c19a74ea
commit 932eaa3f90
13 changed files with 32 additions and 55 deletions

View File

@@ -1373,7 +1373,7 @@ namespace ts.server {
}
// close projects that were missing in the input list
forEachKeyInMap(projectsToClose, externalProjectName => {
forEachKey(projectsToClose, externalProjectName => {
this.closeExternalProject(externalProjectName, /*suppressRefresh*/ true)
});

View File

@@ -619,12 +619,12 @@ namespace ts.server {
const removed: string[] = [];
const updated: string[] = arrayFrom(updatedFileNames.keys());
forEachKeyInMap(currentFiles, id => {
forEachKey(currentFiles, id => {
if (!lastReportedFileNames.has(id)) {
added.push(id);
}
});
forEachKeyInMap(lastReportedFileNames, id => {
forEachKey(lastReportedFileNames, id => {
if (!currentFiles.has(id)) {
removed.push(id);
}