bublejs / buble

https://buble.surge.sh
MIT License
871 stars 67 forks source link

Support for async functions #90

Open trusktr opened 6 years ago

trusktr commented 6 years ago

It would be useful to transpile async functions, they're a valid part of the language.

See here for previous discussion: https://gitlab.com/Rich-Harris/buble/issues/71

The fast-async package provides a leaner/faster result than regenerator (let's not use regenerator), and I think it can be further optimized because when I convert async functions to Promise-based equivalents manually, they always come out with the leanest result. The new Promise.finally will help with this.

This may require a Promise polyfill to be supplied by the user, and that should be documented.

IvanSanchez commented 6 years ago

See https://github.com/Rich-Harris/buble/pull/12

shirotech commented 6 years ago

See https://github.com/Rich-Harris/buble/pull/125 also, hope it gets approved :)