Forum Discussion
cmpenn
Contributor
Oh yeah...something really went wrong with those.
As for what I tried...I tried exporting the class, and I've tried requiring the class. I even tried following the module format to see if that would do anything...but I got errors that the constructor could not be called.
The Class File
class MainClass{
constructor() {
}
Start() {
}
Close() {
}
}
module.exports = {MainApp: MainClass}
The file calling the class
var main = require("Main");
const mainApp = new main.MainApp();
mainApp.Start();
Related Content
- 8 years ago
- 8 years ago
- 3 years ago
- 8 years ago
Recent Discussions
- 7 hours ago