function in interface in typescript in react code example
Example: typescript interface
interface NumberOrStringDictionary {
[index: string]: number | string;
length: number; // ok, length is a number
name: string; // ok, name is a string
}Try