Skip to content

Commit

Permalink
fix(typed-form-array): set/patchValue now use TValue directly as it e…
Browse files Browse the repository at this point in the history
…xtends any[]
  • Loading branch information
ntziolis committed Feb 26, 2020
1 parent 338a9b8 commit 1472ab0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/ngx-sub-form/src/lib/ngx-sub-form-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export interface TypedFormGroup<TValue> extends FormGroup {
patchValue(value: Partial<TValue>, options?: Parameters<FormGroup['patchValue']>[1]): void;
}

export interface TypedFormArray<TValue> extends FormArray {
export interface TypedFormArray<TValue extends any[]> extends FormArray {
value: TValue;
valueChanges: Observable<TValue>;
controls: TypedAbstractControl<TValue>[];
setValue(value: TValue[], options?: Parameters<FormArray['setValue']>[1]): void;
patchValue(value: Partial<TValue[]>, options?: Parameters<FormArray['patchValue']>[1]): void;
setValue(value: TValue, options?: Parameters<FormArray['setValue']>[1]): void;
patchValue(value: TValue, options?: Parameters<FormArray['patchValue']>[1]): void;
}

export interface TypedFormControl<TValue> extends FormGroup {
Expand Down

0 comments on commit 1472ab0

Please sign in to comment.