class Test{
constructor(){
this.anybodyProperty = 0;
}
anybodyName() {
return new Promise(resolve => {
setTimeout(() => {
this.anybodyProperty = 1;
resolve(this.anybodyProperty);
}, 1000);
});
}
}
!async function (){
console.log(await (new Test().anybodyName()));
}()