MCPcopy Create free account
hub / github.com/angular/angular / findAngularCore

Method findAngularCore

vscode-ng-language-service/server/src/session.ts:763–783  ·  view source on GitHub ↗

* Find the main declaration file for `@angular/core` in the specified * `project`. * * @returns main declaration file in `@angular/core`.

(project: ts.server.Project)

Source from the content-addressed store, hash-verified

761 * @returns main declaration file in `@angular/core`.
762 */
763 private findAngularCore(project: ts.server.Project): string | null {
764 const projectName = project.getProjectName();
765 if (!project.languageServiceEnabled) {
766 this.info(
767 `Language service is already disabled for ${projectName}. ` +
768 `This could be due to non-TS files that exceeded the size limit (${ts.server.maxProgramSizeForNonTsFiles} bytes).` +
769 `Please check log file for details.`,
770 );
771 return null;
772 }
773 if (!project.hasRoots() || project.isNonTsProject()) {
774 return null;
775 }
776 const angularCore = project.getFileNames().find(isAngularCore);
777 if (angularCore === undefined && project.getExcludedFiles().some(isAngularCore)) {
778 this.info(
779 `Please check your tsconfig.json to make sure 'node_modules' directory is not excluded.`,
780 );
781 }
782 return angularCore ?? null;
783 }
784}
785
786function isTypeScriptFile(path: string): boolean {

Callers 1

Calls 3

infoMethod · 0.95
someMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected