What is the syntax to define onChange in this interface:
interface myInterface{
data: Type1
onChange : ({field: string, value: any}[]) => void
}
It gives me compile error on '=>' (; expected) I want to say onChange receives an array of field-value pair and return type is void. What is the syntax?
(arr: {...}[]). Then either pick arrow prop or method syntax, not both (onChange(...): voidoronChange: (...) => void.