Experimental: Strictly typed reactive forms #38406
Experimental: Strictly typed reactive forms #38406sonukapoor wants to merge 13 commits intoangular:masterfrom
Conversation
40607b1 to
50a99bf
Compare
42eb11c to
a4abb47
Compare
This comment has been minimized.
This comment has been minimized.
|
Hi, Quick update after running tests in Google's codebase: this change is breaking a portion of targets. I performed initial investigation and it looks like a lot of targets are failing with a similar error and we also have this scenario in tests: TypeScript infers the generic type ( It'd be great to investigate if adding a generic type can be avoided in this case (without loosing type safety) - it should reduce the number of failing targets and simplify the migration for users. Thank you. |
This comment has been minimized.
This comment has been minimized.
b0cfde2 to
623004d
Compare
After introduce form control generics, fixed breaking changes: - form group/array control need type hint like this `FormGroup<type>` sometimes
…y.value - added generic for abstractControl.get() - removed null as allowed value for formGroup/formArray value
Because the FormState type is actually intended for FormControl constructor, FormState is renamed to FormControlState.
d8035b4 to
6bb0e5e
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
| const input = fixture.debugElement.query(By.css('input')); | ||
| form.valueChanges.subscribe({ | ||
| next: (value) => { | ||
| next: (value: any) => { |
There was a problem hiding this comment.
unknown instead of any could be better here
|
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. |
Based on the original work from #37389
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information