I want to create subclasses in different js files and extend a superclass in a different js file. So I'm exporting the superclass, and then importing the superclass in all the other js files. But I'm getting an error. What am I doing wrong?
superclassfile.js:
export { Process };
class Process {
constructor() {
}
}
subclassfile.js
import { Process } from 'superclassfile.js';
class SubProcess extends Process {
.....
}
Error: Uncaught ReferenceError: Cannot access 'Process' before initialization