-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
Which @angular/* package(s) are relevant/releated to the feature request?
compiler-cli
Description
The compiler should have some capability for "extended template diagnostics", meaning diagnostics applied after type checking. Currently, the compiler doesn't really have any warnings, and only ever fails for fatal issues that directly prevent compilation (with some minor exceptions). These extended diagnostics will allow warnings to be easily authored to check for smaller mistakes like getting two-way binding syntax backwards ([foo])="bar" or having extraneous operators like using foo ?? 'bar' when foo is not nullable.
For scoping, we just need a private flag in the compiler for now. This will be enough for the CLI and language service to plug in and surface these diagnostics.
Proposed solution
A new private flag in the compiler which enables "extended template diagnostic" checks that give warning/information diagnostics about user templates which aren't strictly fatal errors. This issue is mostly about building the required infrastructure, but we should include one or two simple checks to validate the system.
Alternatives considered
N/A