UNPKG

ngx-typed-reactive-form

Version:

Make Angular Reactive Forms strongly typed with generics.

12 lines (11 loc) 415 B
import { FormGroup } from '@angular/forms'; import { Observable } from 'rxjs'; import { NestedControl } from '../utility-types/nested-control.type'; export interface TypedFormGroup<T> extends FormGroup { value: Partial<T>; valueChanges: Observable<T>; controls: NestedControl<T>; setValue(value: T, options?: {}): void; patchValue(value: Partial<T>, options?: {}): void; getRawValue(): T; }