no0x9d / ngx-strongly-typed-forms

Strongly typed definitions for Anglulars `@angular/forms`
MIT License
59 stars 11 forks source link

Typings for setValue and patchValue #11

Closed ramarivera closed 5 years ago

ramarivera commented 5 years ago

The signature of the patchValue method is:

patchValue(value: Partial<T>, options?: { onlySelf?: boolean; emitEvent?: boolean; }): void;

while for the setValue method:

`setValue(value: {

}, options?: {
    onlySelf?: boolean;
    emitEvent?: boolean;

}): void;`

Since the patchValue is a Partial<T>, shouldn't the setValue take a value of type T? Or is there something I am missing regarding setValue?

Thanks!

no0x9d commented 5 years ago

fixed with #20