Closed donaldwasserman closed 5 years ago
@donaldwasserman Facing the same thing. Updating ember 3.8 -> 3.10 . Did you find anything? I'm not using typescript, so not a typescript issue.
@abhishek97 - I did not, however in a non-typescript context bumping to 3.10, I imported task
from ember-concurrency
and changed the syntax:
@task // imported from `e-c-decorators`
myTask = function*() {}
to
// imported from `ember-concurrency`
@task(function*() {}) myTask
This seemed to solve all of my issues in the non-typescript context. I haven't had time to check this in typescript yet.
Quoting from the README:
Installation
This package only works with Ember Octane, which is currently the latest Ember Beta. You'll need at least
ember-cli-babel@^7.7.2
and not use@ember-decorators/babel-transforms
, so that you get the Ember.js vanilla stage 1 / legacy decorators. Then install as any other addon:ember install ember-concurrency-decorators@beta
For non-Octane apps, use the latest version:
ember install ember-concurrency-decorators
When using the beta
, which only works with Octane (vanilla stage 1 decorators in Ember.js, aka ember-decorators@6
+ ember-decorators-polyfill
without @ember-decorators/babel-transforms
), you have to use the assignment syntax (@task myTask = function*() {}
), as shown in the README.
When using the latest
(0.6
) version, which only works with stage 2 decorators, you can use the nice @task *myTask() {}
syntax.
Because of https://github.com/machty/ember-concurrency-decorators/issues/48 it's currently not possible to use the @task *myTask() {}
syntax with Octane stage 1 decorators.
Thanks for clarifying @buschtoens!
I think for many people (or at least me) don't fully understand the differences/usages of which stage of decorators their apps are using. Would you be open to me opening up a PR to clarify usage/requirements in the readme?
@donaldwasserman That would be amazing! I'd love it. Thanks!
I'm not sure how to title this error, becuase I have no idea what's going on.
I have a typescript app I'm trying to update from
ember 3.9
=>3.10
e-d 5.2
=>6.0
e-c-t 1.5
=>2.0
So when I'm using
ember 3.10
,e-d 6.0
,ember-concurrency-decorators
1.0.0-beta.2and
e-c-t 1.5`, I get the following error:The code this is happening on is:
Is this an issue here? In typescript? Somewhere else?