ember.js
ember.js copied to clipboard
Adding stage3-compatible decorator implementations
(This should stay draft and not merge until we have some consensus on the ecosystem-spanning parts of the migration.)
This is an exploration to see how easy it is to make the ember-provided decorators work under both legacy decorators and stage3 decorators.
(I don't think it's hard!)
The first commit here implements @tracked. I tested it in an application with the configuration:
const app = new EmberApp(defaults, {
'ember-cli-babel': {
disableDecoratorTransforms: true,
},
babel: {
plugins: [
[
'@babel/plugin-proposal-decorators',
{
version: '2023-05',
},
],
],
},
});
With those settings, @tracked foo becomes a runtime error and will tell you to use @tracked accessor foo instead, and when you do it all works correctly.
Is this still relevant? It is a draft PR
Still planning to pick this back up. Now that the build refactor has landed it's a bit easier to test.