I'm trying to better understand the code in this example: https://codesandbox.io/s/r5n96yvwnm
So there is this function (lines 9-11):
function MyCell({ value, columnProps: { rest: { someFunc } } }) {
return <a href="#" onClick={someFunc}>{value}</a>
}
What construct is it, and is it possible to translate it easily into Typescript? I mean, I could go ahead and create a typescript interface with all needed props but I was wondering, if there is any shorter way of doing so. I have never seen a construct like this, so any links with more explanation appreciated.
Thanks
function MyCell({ value, columnProps: { rest: { someFunc } } }:{ value: number, columnProps: { rest: { someFunc: () => void } } })