Open andreyfel opened 4 years ago
Note that we don't make any checks if the syntax is supported like Ember does using assert
.
I believe the error message would be helpful, to prevent confusion during migration if those edge cases were used in Ember apps. But I'm not sure what is the best way to do those checks. Just throw an error if users are trying to use unsupported syntax?
This PR partially addresses the 2nd concern from #11. This is how expansion syntax is implemented in Ember: https://github.com/emberjs/ember.js/blob/master/packages/%40ember/-internals/metal/lib/expand_properties.ts It doesn't support nested syntax but supports some other edge cases like:
See tests https://github.com/emberjs/ember.js/blob/master/packages/%40ember/-internals/metal/tests/expand_properties_test.js
These cases seems like it is too much for
macro-decorators
but the very basic expansion syntax can be helpful as it might be used in many Ember apps willing to migrate to@tracked
properties.