I have some classes I want to extend and I want the new classes to have their parent class's name with a prefix. I want to do this in a single place in a single function.
Pseudo-code:
function getChildClass(parentConstructor) {
return class `ChildOf${parentConstructor.name}` {
constructor() { /*some common logic*/ }
}
}
This is a syntax error, however.
This is purely for aesthetic reasons. I just want the names to reflect the parent class they extend when they show up during debugging.