I have encountered an issue while attempting to create a child class within my parent class. Here is the code snippet:
class Stage {
a() {
return new ChestStage();
}
}
Below is the child class code:
class ChestStage extends Stage {
constructor(){
super();
}
}
Unfortunately, I received the following error message:
Unhandled Promise rejection: Cannot access 'XModule' before initialization ; Zone: <root> ; Task: Promise.then ; Value: ReferenceError: Cannot access 'XModule' before initialization
The error seems to be related to the 'extends' keyword, as removing it resolves the issue. However, I am unsure of how to address this problem. Any suggestions or ideas would be appreciated.