Skip to content

Commit

Permalink
Merge pull request #171 from AlexanderFSP/fix/mark-as-touched-typing
Browse files Browse the repository at this point in the history
fix: markAsTouched typings to handle onlySelf argument
  • Loading branch information
NetanelBasal committed Dec 2, 2022
2 parents a068810 + d8352ea commit 973bf06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libs/reactive-forms/src/lib/form-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ export class FormArray<
}

markAsTouched(
...opts: Parameters<UntypedFormArray['markAllAsTouched']>
): ReturnType<UntypedFormArray['markAllAsTouched']> {
...opts: Parameters<UntypedFormArray['markAsTouched']>
): ReturnType<UntypedFormArray['markAsTouched']> {
super.markAsTouched(...opts);
this.touchChanges.next(true);
}
Expand Down
4 changes: 2 additions & 2 deletions libs/reactive-forms/src/lib/form-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export class FormControl<T> extends UntypedFormControl {
}

markAsTouched(
...opts: Parameters<AbstractControl['markAllAsTouched']>
): ReturnType<AbstractControl['markAllAsTouched']> {
...opts: Parameters<AbstractControl['markAsTouched']>
): ReturnType<AbstractControl['markAsTouched']> {
super.markAsTouched(...opts);
this.touchChanges.next(true);
}
Expand Down
4 changes: 2 additions & 2 deletions libs/reactive-forms/src/lib/form-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ export class FormGroup<T extends Record<string, any>> extends UntypedFormGroup {
}

markAsTouched(
...opts: Parameters<AbstractControl['markAllAsTouched']>
): ReturnType<AbstractControl['markAllAsTouched']> {
...opts: Parameters<AbstractControl['markAsTouched']>
): ReturnType<AbstractControl['markAsTouched']> {
super.markAsTouched(...opts);
this.touchChanges.next(true);
}
Expand Down

0 comments on commit 973bf06

Please sign in to comment.