I have the following function:
function test(): number {
return 42;
}
I can obtain the type of the function by using typeof:
type t = typeof test;
Here, t will be () => number.
Is there a way to obtain the return type of the function? I would like t to be number instead of () => number.