📅  最后修改于: 2022-03-11 14:48:28.791000             🧑  作者: Mango
export class ImportedClass {
public constructor(something: any) {
}
public async exampleMethod() {
return "hey";
}
}
interface GenericInterface {
new(something: any): T;
}
export class Simulator }> {
public constructor(private c: GenericInterface) {
}
async work() {
const instanceTry = new this.c("hello");
await instanceTry.exampleMethod();
}
}
const simulator = new Simulator(ImportedClass);
simulator.work()