This is a simplified example of passing to a generic function an object and the name of a method in that object.
function invoke<TYPE_OBJ extends object>(obj: TYPE_OBJ, methodName: keyof TYPE_OBJ){
return obj[methodName](); //*** This expression is not callable. Type '{}' has no call signatures.ts(2349)
}
What am I missing to specify that the methodName corresponds to a callable thing?
ts version 4.2.4