You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classStatus{asyncok():Promise<boolean>{constructor(promise:Promise){this.promise=promise}try{awaitthis.promisereturntruecatch(e){returnfalse}}}conststatus=newStatus(promise)if(awaitstatus.ok()){// do stuff}
refactor:
asyncfunctionmethod(){leterror:void|Errortry{awaitpromise}catch(e){error=e}returne}if(!(awaitmethod())){// do stuff}
The text was updated successfully, but these errors were encountered:
Status
is just a wrapper forPromise
Current Status:
refactor:
The text was updated successfully, but these errors were encountered: