Skip to content
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

DeepPartial<T> in value, valueChanges and patchValue() #15

Open
kbrilla opened this issue Aug 23, 2019 · 1 comment
Open

DeepPartial<T> in value, valueChanges and patchValue() #15

kbrilla opened this issue Aug 23, 2019 · 1 comment

Comments

@kbrilla
Copy link

kbrilla commented Aug 23, 2019

The signature in value and valueChanges is using type T, but should't it use DeepPartial. Same with for example patchValue.
value and valueChagnes extract fields that are disabled so it's returning deep partial type. And patchValue takes incomplete object tree so deepPartial again.

What's your point of view on that? If You agree I could add that change.

When Angular uses TypeScript 2.8 the return value should be changed.

We already have it since like forever now :)

@no0x9d
Copy link
Owner

no0x9d commented Nov 4, 2019

Yes TypeScript 2.8 ist long there, but I have to admit that I didn't think this feature was too important for the little bit of spare time I have.
Now I realised, that I can't event use my lib on the default reactive forms example from angular.io documentation, because it uses a FormGroup#patch with a deep partial value.

If you still want to add it, I'm happy to accept a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants