I'm looking for the one-argument typesafe equivalent of Function.prototype.call in Typescript.
This does not work, because F is missing the proper constraint (perhaps):
function call<F,A>(f: F, arg: A) {
return f(arg);
}
Thus, Typescript complains "This expression is not callable. Type 'unknown' has no call signatures."
How do I make F callable? How do I manage call to have the return type of F?