for example, how do you get all the subclasses of a specified base class using a class defined by es6 class?
for example, three classes A, B, C
class A {}
class B extends A{}
class C extends A{}
how do we get all the subclasses of A? (= ^--^ =)
< hr >some people say that this question is meaningless. Haven"t you ever experienced the situation of switching multiple operations according to the state? Is it more elegant to use if-else judgment one by one than to use class to implement polymorphism? Please tell me