Open jelbourn opened 6 years ago
Ping on this, looks like there are still some failures. I can blast ! with an autofixer if you will prefer that?
@rkirov Kristiyan had a PR, but we deprioritized it over other stuff. How aggressively do you want to turn off this exception?
It is not urgent, we were just cleaning up the special exceptions for not particular reason. We can wait another year.
It's been close to an year and a lot of new code was written without checking for strict property initialization.
Since I had the auto-fixer ready (we used it internally years ago), I made a large PR suppressing errors and turning on the flag - https://github.com/angular/components/pull/19339.
My secret motivation here is to clean-up some of the special cases we have added internally when compiling angular2_material.
This also impacts external users of angular/material lib, not just lib authors internally.
Due to the lack of this check, some component optional inputs are incorrectly declared as non-nullable, which makes it harder to use in apps.
Some examples I'm staring at right now are MatFormField#appearance
(has a default fallback) and MatAutocompleteTrigger#matAutocompleteConnectedTo
.
Pretty sure there are more examples like that
We want to turn this on so that cdk/material don't have an exception inside Google (which has all strictness checks enabled).