New account registration is temporarily disabled.

[SCRIPTING] [RMMV] IMPLEMENTING CLASS INHERITANCE BETWEEN CLASSES IN THE SAME OBJECT

Posts

Pages: 1
For a plugin, I'm organizing my classes in a namespace. I want one of the classes within it to inherit from another, using ES6 syntax. Here's some example code to show the problem:

let myNamespace = 

{
ParentClass: class { ... },
ChildClass: class extends myNamespace.ParentClass { ... },
}


JS throws a TypeError when I try to run that. How do I make it work without moving the child class outside of the namespace?
Pages: 1