check type of control group or array code example
Example: formarray set value at index
((this.form.get('controls') as FormArray).at(index) as FormGroup).get('description').patchValue(item.description);
((this.form.get('controls') as FormArray).at(index) as FormGroup).get('description').patchValue(item.description);