Let's say I this schema, I want to be able to get the inherited class file path from the generic function to avoid setting something like this.path = __dirname in every inherited constructor
class A {
path; // Should be classA.js path
constructor() {
this.path = getPath();
}
}
class B extends A {
someFunction() {
this.path; // Should be classB.js path
}
}