ember-decorators / argument

Decorators for Component and Object arguments in Ember
MIT License
30 stars 18 forks source link

Cannot assign to read only property 'entity' of object '[object Object]' #112

Open VincentMolinie opened 4 years ago

VincentMolinie commented 4 years ago

Hi, I tried to use you library on version v1.0.0-beta.2 With the following code:

import Component from '@ember/component';
import { tagName } from '@ember-decorators/component';
import { argument } from '@ember-decorators/argument';
import { Action } from '@ember-decorators/argument/types';
import Model from '@ember-data/model';

@tagName('')
export default class MyComponent extends Component {
  @argument(Model) entity;
  @argument(Action) save;
  @argument(Action) discard;
}

But I keep getting the following error:

Cannot assign to read only property 'entity' of object '[object Object]'

It works perfectly fine on v0.8.21.

What am I doing wrong ?

alexlafroscia commented 4 years ago

What Ember version are you using?

VincentMolinie commented 4 years ago

Ember 3.12.2