I have a super class called API in a separate file called API.js
class API {
???
}
I also have a bunch of subclasses each in a separate file (MySubClassXXX.js) that include a number of static methods like:
class MySubClass1 {
static method1 () {
return { something }
}
static method2 () {
return { something else }
}
}
I would like yo use these methods in my project like this API.MySubClass1.method1()
how should I import and define the subclasses MySubClass1 in the main class API
classes in the first place. Use object literals. Or instances of a base class if you want to share some of the methods and overwrite others.