how to specify a function in typescript interface 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