I have the following code:
function parseValueFromComplexType(complexType, item) {
return item[complexType];
}
In order to bind the value complextype, i use angular.bind
let parseValueFromComplexTypeWithValue = angular.bind('', parseValueFromComplexType , config.complexType);
val.values = val.values.map(parseValueFromComplexTypeWithValue);
Now typescript complains:
error TS2345: Argument of type 'Function' is not assignable to parameter of type '(value: any, index: number, array: any[]) => {}'.
What does the error mean and how can i get rid of it?