forEachConfigFileLocation(info, action) {
    if (this.serverMode !== 0 /* Semantic */) {
      return void 0;
    }
    Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path));
    const projectRootPath = this.openFiles.get(info.path);
    const scriptInfo = Debug.checkDefined(this.getScriptInfo(info.path));
    if (scriptInfo.isDynamic)
      return void 0;
    let searchPath = asNormalizedPath(getDirectoryPath(info.fileName));
    const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames);
    const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot();
    let searchInDirectory = !isAncestorConfigFileInfo(info);
    do {
      if (searchInDirectory) {
        const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName);
        const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json"));
        let result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName);
        if (result)
          return tsconfigFileName;
        const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json"));
        result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName);
        if (result)
          return jsconfigFileName;
        if (isNodeModulesDirectory(canonicalSearchPath)) {
          break;
        }
      }
      const parentPath = asNormalizedPath(getDirectoryPath(searchPath));
      if (parentPath === searchPath)
        break;
      searchPath = parentPath;
      searchInDirectory = true;
    } while (anySearchPathOk || isSearchPathInProjectRoot());
    return void 0;
  }
This function tries to search for a tsconfig.json for the given file.
This is different from the method the compiler uses because
the compiler can assume it will always start searching in the
current directory (the directory in which tsc was invoked).
The server must start searching from the directory containing
the newly opened file.