interface MyObj {
field?: string;
render?: (text: string) => React.ReactElement;
}
const col: MyObj[] = [
{
field: 'name',
},
{
field: 'age',
},
{
field: 'edit',
render: (text) => {
return (
<a>{text}</a>
)
},
}
]
{ col.map((coll) => (
{coll.render('qewqr')}
))}