I have been working on an app for a while now (Angular 10). I was working on a React project for the last month and didn't touch the angular one. Opened it today and it is riddled with errors. Suddenly, I cannot use the built in array functions on arrays embedded within objects because they aren't typed anywhere so they defaulted to type 'never'.
Here is an example ...
this.currentDesign.parameterMenus.forEach(menu => {
let thisIndex=menu.parameters.findIndex((mI) => { return ss==mI['shapediver']});
thisIndex !=-1 ? type = 'parameter' : '';
});
The error occurs on the 'parameters' aspect of the menu.parameters array. While the "currentDesign" object has a model and an interface, the parameters array does not. Apparently, it just defaults to never instead of any and that is a problem.
The exact error is
Property 'parameters' does not exist on type 'never'.
Why did this start happening and what can I do about it?