I have following code and wondering if I can apply as arrow function on line data({value}: {value: string}) {return func(value); },
function func(value: string){
return `${value} has been formated`
}
const rowData = {
height: 20,
data({value}: {value: string}) {
return func(value);
},
width: 130,
};
console.log(rowData.data({value:'aaaa'})) //aaaa has been formated
I have try data({value}: {value: string}) => func(value),
but it does not seem to work