Is there a way to simplify my class A implementation?
export class A<TB extends B<TC>, TC> implements TD<TB, TC> {
make(): TC {}
}
Currently, I have to specify the TC type every time I create an instance of A:
class CTest {}
class BTest extends B<CTest> {}
const a = new A<BTest, CTest>();
a.make() // -> CTest
Since TC type is already a generic argument of B, is it possible to streamline this process like so:
export class A<TB extends B<TC>> implements TD<TB, TC> {
make(): TC {}
}
class CTest {}
class BTest extends B<CTest> {}
const a = new A<BTest>();
a.make() // -> CTest