Asynchronous constructor is not possible. By design, constructors should return the instance of the class so it means it cannot return a Promise object.
You could do something like this though:
class Base {
constructor() {
}
async computeFoos() {
return foos
}
}
class Sub extends Base {
constructor() {
super()
}
}
const start = async () => {
const obj = new Sub()
const foos = await obj.computeFoos()
console.log(foos)
}
start()