machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 157 forks source link

v2: Integrate "nice" decorators from ember-concurrency-decorators #386

Closed maxfierke closed 3 years ago

maxfierke commented 3 years ago

Supersedes #384

This provides built-in support for the "nice" decorator syntax based on the decorators implemented at ember-concurrency-decorators. Many thanks to @buschtoens for years of stewardship of that addon, and important contributions from @chancancode for TypeScript support, and others in the community to get it to a place where it's seen wide adoption in the world of Ember Octane, TypeScript, and native ES classes.

The "ugly" decorators (e.g. (@(task(function* () { ... }).drop()) will remain available by virtue of coming "for free" with the computed-based TaskProperty implementation (necessary to support the classic EmberObject model for task hosts), but will be deprecated in favor of these "nice" decorators at some point in the future.

A follow-up PR will convert all the docs to also using these "nice" decorators.