using a interface in a function code example Example: interface function interface SearchFunc { (source: string, subString: string): boolean; }