In TypeScript, if I have a function, I can get the type of that function:
function foo(v: number) {}
type FooType = typeof foo; // RESULT: (v: number) => void
If I have a generic function, I can get the type of that function, and the type indicates that it is generic.
function foo<T>(v: T) {}
type FooType = typeof foo; // RESULT: <T>(v: T) => void
How can I get the type of the generic function when a known set of types is used? This doesn't work.
function foo<T>(v: T) {}
type FooNumberType = typeof foo<number>; // DESIRED: (v: number) => void
^ error TS1005: ';' expected.