Below is the code I am currently working with:
class BaseClass {
// includes a static method
static someMethod() {
}
}
class ChildClass extends BaseClass{
}
class AnotherClass {
protected variable: BaseClass; // Works fine with type 'any'
protected someFunction() {
return this.variable.someMethod(); // Shows an error that there's no someMethod in the BaseClass
}
}
The issue at hand is that I need the protected variable in AnotherClass to store the class function rather than the class instance.
Is it feasible to achieve this?
Thank you for your assistance.
Please excuse any errors in my English.