Pass the return type to the generic Promise object.
type SearchFn = (subString: string): Promise<string>;
}
Alternatively, you can declare a generic type AsyncFunction.
type AsyncFunction <A,O> = (...args:A) => Promise<O>
type SearchFn = AsyncFunction<[string], string>
AsyncFunction is a generic type that receives two type variables - input type (A) and output type.