Is there any way to describe this interface in typescript:
abstract class Entity { /*...*/ }
interface List<A extends Entity> { /*...*/ }
// I want the below interface
interface Collections {
[name: string]: List<A extends Entity>;
}
The Collections object contains different List objects of classes that extend the Entity class. So the following code doesn't solve my problem:
interface Collections<A extends Entity> {
[name: string]: List<A>;
}
The above interface serves only for one single class A, I want it to serve multiple classes extend from Entity class.
Thank you!