Yes, like you guessed, it's a js object with key as string and AbstractControl
as values.
For example:
{
"control1": new Control(),
"control2": new Control()
}
Edit
You can declare a variable to be of this type in two ways:
let controls: { [key: string]: AbstractControl };
or
interface ControlsMap {
[key: string]: AbstractControl;
}
let controls: ControlsMap;
or even better:
interface ControlsMap<T extends AbstractControl> {
[key: string]: T;
}
let controls1: ControlsMap<AbstractControl>;
let controls2: ControlsMap<MyControl>;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…