ngneat / reactive-forms

(Angular Reactive) Forms with Benefits 😉
https://www.netbasal.com
611 stars 56 forks source link

fix: markAsTouched typings to handle onlySelf argument #171

Closed AlexanderFSP closed 2 years ago

AlexanderFSP commented 2 years ago

FormControl#markAsTouched and others can't handle options argument with onlySelf?: boolean (but it should) due to wrong type annotation.

const contol = new FormControl<string>('');

contol.markAsTouched({ onlySelf: true }); // Error: Expected 0 arguments, but got 1.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

stackblitz[bot] commented 2 years ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.