Check out example codes for "interface function". It will help you in understanding the concepts better.

Code Example 1

interface SearchFunc {
  (source: string, subString: string): boolean;
}

Learn ReactJs, React Native from akashmittal.com