For example, I have a class Module and many classes will inherit from it. For example, the User module or the Session module, and I want to store all these classes in one place.
class User extends Module { } api.addModule(User) How do I describe the type of argument taken by the addModule function?
addModule (moduleClass:Function){ this.modules[moduleClass.name] = moduleClass } moduleClass: Function ??? Fankshen works, but I do not need any functions, namely classes, and even inherited from Module
moreover I want to create the addModules function
api.addModules([User, Session]) so that you can take an array of classes =) tell me how to describe such a parameter in the typescript? so that no matter how instanced a class is, namely the class itself or its classes are heirs.