ngx-typesafe-forms icon indicating copy to clipboard operation
ngx-typesafe-forms copied to clipboard

FormControl.patchValue should accept param T instead of Partial<T>

Open peterreisz opened this issue 5 years ago • 1 comments

The FormControl can represents represents primitives (string, number) and Partial<T> parameter messing up the typings. Also in the angular the patchValue implementation it just calls setValue.

peterreisz avatar May 26 '20 10:05 peterreisz

Sorry, I didn't do a lot of frontend over the past months so I kinda forgot to take a look at your issue.

The FormControl can represents represents primitives (string, number) and Partial<T> parameter messing up the typings.

Can you provide an example? Because any type T should always be assignable to Partial<T>.

Also in the angular the patchValue implementation it just calls setValue.

I checked it in the sources, but that does not seem to be the case.

dirkluijk avatar Aug 24 '20 09:08 dirkluijk