* Find the main declaration file for `@angular/core` in the specified * `project`. * * @returns main declaration file in `@angular/core`.
(project: ts.server.Project)
| 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 | |
| 786 | function isTypeScriptFile(path: string): boolean { |
no test coverage detected