I changed my .js file to a typescript file .tsx. I have the following function defined within the file:
function MyCard(param1: ObjectDto, toggleFunction: any) {}
I am using this function in another .tsx file like this
<MyCard param1={param1Value} toggleFunction={myToggleFunction} />
But I am getting the following error:
Type '{ param1: ObjectDto; toggleFunction: (index: any) => void; }' is not assignable to type 'IntrinsicAttributes & ObjectDto'. Property 'param1' does not exist on type 'IntrinsicAttributes & ObjectDto'.
This worked fine before changing to the Typescript format. How can I fix this for Typescript?