-
Notifications
You must be signed in to change notification settings - Fork 26.5k
fix(forms): improve types of directive constructor arguments #38944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(forms): improve types of directive constructor arguments #38944
Conversation
Initial presubmit + Global TAP run (internal-only links). |
af5d0d0
to
88fd6d4
Compare
This PR is created for testing purposes only to check angular/angular#38944 PR with listed applications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: public-api
Just a quick update: this change has limited impact in Google's codebase (only 1 target was affected) and the tests went well in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for verifying the impact of this breaking change. I think most of the breakages will be within the application (as opposed to 3rd party library) code, so developers should be able to resolve them during an upgrade along with other breakages caused by improved TypeScript compiler checks.
LGTM!
Reviewed-for: public-api
Prior to this change, the `validators` and `asyncValidators` fields of a few Forms directives were typed as `any[]`. This commit updates the types and makes them consistent for all directives in the Forms package. BREAKING CHANGE: Directives in the `@angular/forms` package used to have `any[]` as a type of `validators` and `asyncValidators` arguments in constructors. Now these arguments are properly typed, so if your code relies on directive constructor types it may require some updates to improve type safety.
88fd6d4
to
4711696
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Prior to this change, the
validators
andasyncValidators
fields of a few Forms directiveswere typed as
any[]
. This commit updates the types and makes them consistent for all directivesin the Forms package.
BREAKING CHANGE:
Directives in Forms package used to have
any[]
as a type ofvalidators
andasyncValidators
arguments in constructors. Now these arguments are properly typed, so if your code relies on
directive constructor types it may require some updates to improve type safety.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?