1 min readJul 15, 2020
Each
AbstractControl
takes a generic, which serves as thetype
for any method or property exposed by Angular or this library:Use it with a
FormControl
:
import { FormControl } from ‘@ngneat/reactive-forms’;
const control = new FormControl(‘’);
control.value$.subscribe(value => { // value is typed as string});
I do not see any generics here, neither in the following snippets with controls. Only FormGroup and FormArray have generic type in the examples.