private findAngularCore()

in server/src/session.ts [1135:1154]


  private findAngularCore(project: ts.server.Project): string|null {
    const {projectName} = project;
    if (!project.languageServiceEnabled) {
      this.info(
          `Language service is already disabled for ${projectName}. ` +
          `This could be due to non-TS files that exceeded the size limit (${
              ts.server.maxProgramSizeForNonTsFiles} bytes).` +
          `Please check log file for details.`);
      return null;
    }
    if (!project.hasRoots() || project.isNonTsProject()) {
      return null;
    }
    const angularCore = project.getFileNames().find(isAngularCore);
    if (angularCore === undefined && project.getExcludedFiles().some(isAngularCore)) {
      this.info(
          `Please check your tsconfig.json to make sure 'node_modules' directory is not excluded.`);
    }
    return angularCore ?? null;
  }