Código actual:
class Test { doOne = async () => { ... }; } module.exports = new Test();Quiero algo como esto:
class Test { doOne = async () => { ... }; } const testOne = async () => { ... } module.exports = new Test(); ¿Cómo puedo exportar la función testOne ? ¿Es posible exportar tanto la Test clase como la función testOne ?
Necesita exportar un objeto con propiedades de class y function .
class Test { doOne = async () => { ... }; } const testOne = async () => { ... } module.exports = { test: new Test(), testOne, }