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
I'm looking for something that, with any version of babel, can simply translate async/await into Promises in a human-readable form - no any extra helpers or prototypes, etc.
I've been trying the different examples in the README, but even with promise: true it seems that $asyncbind and trampoline, etc get added.
Also, it seems to use new Promise(function ($return, $error) {}) rather than Promise().resolve(function () {}), which seems like it would lead to thrown errors not being caught. Or maybe async/await doesn't actually handle errors the way I thought it does...
Apparently new Promise(function (resolve, reject) { ... }) catches exceptions now... or maybe it always did and I'm getting confused about it's inability to handle a returned promise with a rejection
The text was updated successfully, but these errors were encountered:
I'm looking for something that, with any version of babel, can simply translate async/await into Promises in a human-readable form - no any extra helpers or prototypes, etc.
Example In:
Example Out:
Is this tool capable of that?
I've been trying the different examples in the README, but even with
promise: true
it seems that$asyncbind
andtrampoline
, etc get added.Also, it seems to usenew Promise(function ($return, $error) {})
rather thanPromise().resolve(function () {})
, which seems like it would lead to thrown errors not being caught. Or maybeasync
/await
doesn't actually handle errors the way I thought it does...Apparently
new Promise(function (resolve, reject) { ... })
catches exceptions now... or maybe it always did and I'm getting confused about it's inability to handle a returned promise with a rejectionThe text was updated successfully, but these errors were encountered: