Skip to content

Commit 1472ab0

Browse files
committed
fix(typed-form-array): set/patchValue now use TValue directly as it extends any[]
1 parent 338a9b8 commit 1472ab0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/ngx-sub-form/src/lib/ngx-sub-form-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ export interface TypedFormGroup<TValue> extends FormGroup {
5252
patchValue(value: Partial<TValue>, options?: Parameters<FormGroup['patchValue']>[1]): void;
5353
}
5454

55-
export interface TypedFormArray<TValue> extends FormArray {
55+
export interface TypedFormArray<TValue extends any[]> extends FormArray {
5656
value: TValue;
5757
valueChanges: Observable<TValue>;
5858
controls: TypedAbstractControl<TValue>[];
59-
setValue(value: TValue[], options?: Parameters<FormArray['setValue']>[1]): void;
60-
patchValue(value: Partial<TValue[]>, options?: Parameters<FormArray['patchValue']>[1]): void;
59+
setValue(value: TValue, options?: Parameters<FormArray['setValue']>[1]): void;
60+
patchValue(value: TValue, options?: Parameters<FormArray['patchValue']>[1]): void;
6161
}
6262

6363
export interface TypedFormControl<TValue> extends FormGroup {

0 commit comments

Comments
 (0)