-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support strict option #26
Comments
@chrisguttandin could please provide a stackblitz/ng-run minimal repo with this? |
Hi @NetanelBasal, hi @danzrou, thanks for taking a look. I created a repo over here: https://github.com/chrisguttandin/reactive-forms I generated the project with the The |
@chrisguttandin can you please try to fork from |
Hi @danzrou, using |
Thanks. @NetanelBasal we can proceed with merge I guess |
Nope. We need to check it on our project first to see that it didn't cause regressions. |
I believe I have a problem that is related to this one. Trying to upgrade to Angular 10 and on build I get this error If this is related, when might the pull request be merged in. Otherwise I can open up a new issue as I cannot find any matching issue or pull request that is similar to this issue. Thanks |
It's not related. We should change asyncValidator to a getter. You can open a PR. |
Any news on when this will be merged? |
I could not reproduce this on the latest version, can you check? |
Hi @danzrou, thanks for the heads-up. The example repo (https://github.com/chrisguttandin/reactive-forms) I built for this issue compiles successfully with v1.4.2. I think we can close this. |
Hmm, I'm not sure if it's really related to this issue, but I faced an issue using Component: export interface User {
readonly age: number;
readonly name?: string;
}
...
@Component({ ... })
export class MyComponent {
readonly formGroup = this.formBuilder.group<User>({
age: [0, [Validators.required]],
name: undefined,
});
} HTML: <ng-container [formGroup]="formGroup">
...
</ng-container> It doesn't compile under strict, it throw the following error:
I noticed that it just happens if you have an optional property declared. |
@rafaelss95 could you try add |
This doesn't work also, because as I mentioned above, the error happens when you have at least one optional property... so if you make all properties optional using |
I'm submitting a...
Current behavior
TypeScript will not compile the project because of the following errors:
Expected behavior
I would expect the project to compile successfully.
Minimal reproduction of the problem with instructions
Please, let me know if a repo with an example project would be helpful. I'm happy to create one if necessary.
What is the motivation / use case for changing the behavior?
I would like to use this library with Angular v10.
Environment
The text was updated successfully, but these errors were encountered: