Here's a valid typescript snippet:
class A{
}
// what is the type of x ? i.e. f( x: <TYPE HERE>)...
function f(x) {
return new x();
}
const t = f(A);
It is obvious that the type of x is the type of the constructor function but it is not clear to me how one would specify it in Typescript.
Is it possible to type the parameter x ?
If yes, what is the type?