Here is the code snippet I am currently working with:
function parseValueFromComplexType(complexType, item) {
return item[complexType];
}
To bind the value of complex type, I am using angular.bind like so:
let parseValueFromComplexTypeWithValue = angular.bind('', parseValueFromComplexType, config.complexType);
val.values = val.values.map(parseValueFromComplexTypeWithValue);
However, TypeScript is raising an error message:
Error TS2345: Argument of type 'Function' is not assignable to parameter of type '(value: any, index: number, array: any[]) => {}'.
I am curious about what this error means and how I can resolve it. Any insights?