Enable async/await to work on functions that don't just return promises.
Tab Atkins Jr.
jackalmage at gmail.com
Mon Feb 27 19:01:25 UTC 2017
On Mon, Feb 27, 2017 at 12:41 AM, Isiah Meadows <isiahmeadows at gmail.com> wrote:
> May I add one more thing: the main topic this was about is adapting
> non-standard async APIs (like Node's error-first callback idiom) to the land
> of promises. Async functions and iterators are incredibly useful when you're
> dealing with just promises, especially consuming them, but this is about
> creating promise adapters, not consuming promises.
You don't need to change the behavior of core syntax to make
Node-style error-first callbacks work. That's easily done by
libraries, which have existed in Node-land for quite a while, and can
automatically convert functions that take Node-style callbacks into
functions that return promises.
More information about the es-discuss