reloadConfiguredProjectForFiles(openFiles, clearSemanticCache, delayReload, shouldReloadProjectFor, reason) {
    const updatedProjects = /* @__PURE__ */ new Map();
    const reloadChildProject = (child) => {
      if (!updatedProjects.has(child.canonicalConfigFilePath)) {
        updatedProjects.set(child.canonicalConfigFilePath, true);
        this.reloadConfiguredProject(
          child,
          reason,
          /*isInitialLoad*/
          false,
          clearSemanticCache
        );
      }
    };
    openFiles == null ? void 0 : openFiles.forEach((openFileValue, path) => {
      this.configFileForOpenFiles.delete(path);
      if (!shouldReloadProjectFor(openFileValue)) {
        return;
      }
      const info = this.getScriptInfoForPath(path);
      Debug.assert(info.isScriptOpen());
      const configFileName = this.getConfigFileNameForFile(info);
      if (configFileName) {
        const project = this.findConfiguredProjectByProjectName(configFileName) || this.createConfiguredProject(configFileName);
        if (!updatedProjects.has(project.canonicalConfigFilePath)) {
          updatedProjects.set(project.canonicalConfigFilePath, true);
          if (delayReload) {
            project.pendingReload = 2 /* Full */;
            project.pendingReloadReason = reason;
            if (clearSemanticCache)
              this.clearSemanticCache(project);
            this.delayUpdateProjectGraph(project);
          } else {
            this.reloadConfiguredProject(
              project,
              reason,
              /*isInitialLoad*/
              false,
              clearSemanticCache
            );
            if (!projectContainsInfoDirectly(project, info)) {
              const referencedProject = forEachResolvedProjectReferenceProject(
                project,
                info.path,
                (child) => {
                  reloadChildProject(child);
                  return projectContainsInfoDirectly(child, info);
                },
                1 /* FindCreate */
              );
              if (referencedProject) {
                forEachResolvedProjectReferenceProject(
                  project,
                  /*fileName*/
                  void 0,
                  reloadChildProject,
                  0 /* Find */
                );
              }
            }
          }
        }
      }
    });
  }
This function goes through all the openFiles and tries to file the config file for them.
If the config file is found and it refers to existing project, it reloads it either immediately
or schedules it for reload depending on delayReload option
If there is no existing project it just opens the configured project for the config file
reloadForInfo provides a way to filter out files to reload configured project for