In Java, you can give a class to a method as a parameter using the type \"Class\". I didn\'t find anything similar in the typescript docs - is it possible to hand a class to
Angular internally declare Type
as:
export interface Type extends Function { new (...args: any[]): T; }
With TypeScript3 it should be possible to add types for arguments without function overloading:
export interface TypeWithArgs extends Function { new(...args: A): T; }
Example:
class A {}
function create(ctor: Type): A {
return new ctor();
}
let a = create(A);