We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related to #30 (comment) and #35.
Create a babel transform that converts the following assignment syntax to decorator syntax:
import { task, restartableTask } from 'ember-concurrency-decorators'; class Foo { @restartableTask({ maxConcurrency: 5 }) bar = task(function*(this: Foo) { // ... }); }
import { restartableTask} from 'ember-concurrency-decorators'; class Foo { @restartableTask({ maxConcurrency: 5 }) bar = function*(this: Foo) { // ... }; }
Using task in assignment syntax allows us to provide valid types for TypeScript.
task
Since we're applying a Babel transform now anyway, we can also remove the decorator usage at runtime completely by using Ember.defineProperty.
Ember.defineProperty
import { task } from 'ember-concurrency'; import { defineProperty } from '@ember/object'; class Foo {} defineProperty( Foo.prototype, 'bar', task(function*(this: Foo) { // ... }).maxConcurrency(5).restartable() );
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Related to #30 (comment) and #35.
Create a babel transform that converts the following assignment syntax to decorator syntax:
Using
task
in assignment syntax allows us to provide valid types for TypeScript.Since we're applying a Babel transform now anyway, we can also remove the decorator usage at runtime completely by using
Ember.defineProperty
.The text was updated successfully, but these errors were encountered: