When using Typescript and passing an arrow function into another function as parameter, what would the type callout be?
My situation is with React components, and I'm trying to pass an activation function into a button component. With other such items I'll use an interface, but not sure how to type the param as being a callback function.
const activate = () => { // Activate edit function } export function EditButton({ activate }): SomeInterface { return ( <button className="wishButton" onClick={activate}>/</button> ); }
{ activate: () => void }