I have a module I need to export, but I want to export it after all async operations have finished. Essentially, I need the exported module to be "async ready" at the time I export it
class Store {
async dummy() {
await somethingElse()
}
}
const store = new Store();
// at this point, before exporting it, I want to
await store.dummy()
// but since I am not in a function, I cannot await it
export { store }
Any ideas?