I'm trying to pass a generic type to a callback lambda function
interface Interface {
onChange: <T = string>(val: T) => void
}
const handleOnChange = (val: MY_ENUM) => {...}
const myConfig: Interface[] = [{
onChange: <MY_ENUM>(val) => handleOnChange(val);
}]
the code above doesn't work.