【发布时间】:2020-07-18 15:44:43
【问题描述】:
const Foo: new () => any = class {
constructor() {}
bar(): string {
return ‘Hello World!’;
}
};
const instance = new Foo();
下面我想替换任何原因我的配置不允许任何
new () => 任意
如何定义 Foo() 的结果?
【问题讨论】:
标签: typescript function class function-expression