I creted object and property formTemplateValues. I have this property with 100% guarantee, but I see error: "Object is possibly 'undefined'". It can't be undefited, because I created it. Why did I have this error and how can I fix it?
interface Test {
formTemplateValues?: {
tabData?: {
timeInterval?: string;
};
}[];
}
let a: Test = {
formTemplateValues: []
};
a.formTemplateValues[0] = { // Object is possibly 'undefined'.ts(2532)
tabData: {
timeInterval: "dddd"
}
}