You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess for many others too. It says that it is usable in both ways:
@map('chores')loudChores(chore,index){returnchore.toUpperCase()+'!';}// ['CLEAN!', 'WRITE MORE UNIT TESTS!']// alternative syntax:
@map('chores',function(chore,index){returnchore.toUpperCase()+'!';})loudChores;// ['CLEAN!', 'WRITE MORE UNIT TESTS!']
But when I use the first one, I get a deprecation warning:
Ember Decorators currently supports using the map macro on a function directly, but this is not supported by Ember's official decorators. We'll be removing support in future versions. [deprecation id: macro-function-decoration]
The second one doesn't give it so I guess it is the right way to do it? If so, the "bad" example should be removed from the documentation. If not, what is the right way to use @map?
The text was updated successfully, but these errors were encountered:
We should remove the first example, unfortunately I don't think we'll be able to support the first version upstream without another RFC which is why we started adding the deprecation. FWIW, I think a third party decorator library with different goals will be able to bring back this style of decorator
I guess for many others too. It says that it is usable in both ways:
But when I use the first one, I get a deprecation warning:
The second one doesn't give it so I guess it is the right way to do it? If so, the "bad" example should be removed from the documentation. If not, what is the right way to use
@map
?The text was updated successfully, but these errors were encountered: