ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Adding stage3-compatible decorator implementations

Open ef4 opened this issue 2 years ago • 2 comments

(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.

ef4 avatar Jul 22 '23 19:07 ef4

Is this still relevant? It is a draft PR

kategengler avatar Dec 12 '23 16:12 kategengler

Still planning to pick this back up. Now that the build refactor has landed it's a bit easier to test.

ef4 avatar Jun 05 '24 18:06 ef4