mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit improves the error messages generated by the compiler when NgModule scope analysis finds structural issues within a compilation. In particular, errors are now shown on a node within the metadata of the NgModule which produced the error, as opposed to the node of the erroneous declaration/import/ export. For example, if an NgModule declares `declarations: [FooCmp]` and `FooCmp` is not annotated as a directive, component, or pipe, the error is now shown on the reference to `FooCmp` in the `declarations` array expression. Previously, the error would have been shown on `FooCmp` itself, with a mention in the error text of the NgModule name. Additional error context in some cases has been moved to related information attached to the diagnostic, which further improves the legibility of such errors. Error text has also been adjusted to be more succinct, since more info about the error is now delivered through context. PR Close #44973 |
||
|---|---|---|
| .. | ||
| integrationtest | ||
| linker | ||
| ngcc | ||
| private | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| esbuild.config.js | ||
| import_meta_url.d.ts | ||
| index.ts | ||
| package.json | ||
| tsconfig-build.json | ||
| tsconfig.json | ||