Current code:
class Test { doOne = async () => { ... }; } module.exports = new Test(); I want something like this:
class Test { doOne = async () => { ... }; } const testOne = async () => { ... } module.exports = new Test(); How can I export testOne function? Is that possible to export both class Test and function testOne?
exports.Test = Test;andexports.testOne = testOne;.new Testinstance when you actually want to export the class. Or if you want to export an object, then you should not useclasssyntax, just create an object.