-
Notifications
You must be signed in to change notification settings - Fork 27k
feature(forms): Improve typings for (Async)Validators #48679
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
feature(forms): Improve typings for (Async)Validators #48679
Conversation
79a2100 to
37c6732
Compare
dylhunn
left a comment
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
37c6732 to
ee390e8
Compare
atscott
left a comment
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
ee390e8 to
dd4e413
Compare
|
I just solved the conflicts, is anything preventing the PR from moving forward ? |
With this commit, AsyncValidatorFn cannot be passed as ValidatorFn anymore in FormControl. fixes: angular#48676
dd4e413 to
da189de
Compare
jessicajaniuk
left a comment
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
|
This PR was merged into the repository by commit 07a1aa3. |
|
Independent of the bug fixed in #49693, this caused legitimate breakage in g3 (passing AsyncValidatorFn where ValidatorFn is expected), which needs to be cleaned up. We'll have to reopen this and try again. |
… validator. Previously, this PR cleaned up a bug introduced by angular#48679. However, since that PR needed to be rolled back, this PR now just checks in the test, to prevent that issue from re-occurring in the future.
|
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. |
With this commit,
AsyncValidatorFncannot be passed asValidatorFnanymore inFormControl.To exclude Promises, excluding object with
then(see thenables), to exclude Observables I chose to exclude object with the keysubscribe.fixes: #48676
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The only breaking change should be misuse reports by the compiler of
AsyncValidatorFnasValidatorsFninFormControlconstructors.