maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
727 stars 58 forks source link

Support for Promise-style (ECMAScript-7-style) await #147

Open davidbau opened 9 years ago

davidbau commented 9 years ago

This is just a preliminary demonstration of promise-style await, built as an extension of iced.

If fn is an async function that returns a Promise, then you can now say

await fn() or x = await fn()

Note that this mode only occurs when there is no "defer" inside the awaited expression. If a "defer" is present, the traditional iced-style await is done.

Unfinished items: