jashkenas--coffeescript/documentation/sections/async_functions.md

458 B
Raw Blame History

Async Functions

ES2017s async functions are supported through the await keyword. Like with generators, there's no need for an async keyword; an async function in CoffeeScript is simply a function that awaits.

Similar to how yield return forces a generator, await return may be used to force a function to be async.

codeFor('async', true)