I have a function that returns the controls of a FormArray:
getFormFControls() {
return this.form.get('opts') ? (<FormArray>this.formQuestions.get('opts')).controls : null;
}
But when running the Lint check, I get this error:
Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
I tried many ways to solve this problem, but I can't find a solution when it's a FormArray.controls: AbstractControl[].
Can someone help me?
Tried to remove the and add the 'as FormArray' at the end, but I get an error.
I need to solve this without putting comment to ignore lint in the line