I have the following code to detect if a type T has a function with a specific return type and parameters parameters (simplified version generated by some more
T