interface funciton code example
Example 1: interface function
interface SearchFunc {
(source: string, subString: string): boolean;
}
Example 2: interface ts one valu
// use type instead interface
type StringOrNull = string | null;
interface SearchFunc {
(source: string, subString: string): boolean;
}
// use type instead interface
type StringOrNull = string | null;