我们实现了一个带有optional的泛型类型,它使用默认类型,否则它应该在运行方法时使用类型集。Test` type or with custom type like `method<AnotherType>()`} 现在当我写一个这样的类时{ return Promise.resolve({ b: 'test&
(我正在构建一个模态系统,它接受继承组件并显示它们) 我试图将一个继承组件传递给一个使用它的基类作为类型的方法。BaseCompComponent) { }
Calling it like so: method(ActualComponent) --> ERROR 错误: 'typeof ActualComponent‘类型的参数不能赋值给'BaseCompComponent’类型<e