babel-plugin-transform-class-property-assignment-to-decorator

0.1.1 • Public • Published

babel-plugin-transform-class-property-assignment-to-decorator

Transforms a class property assignment to a decorated class property.

import { task } from 'ember-concurrency';

class Foo {
  simpleTask = task(function*() {}).restartable();
}

// becomes

class Foo {
  @(task(function*() {}).restartable())
  simpleTask;
}

Options

Accepts a configuration object with an imports property, that can look like this:

{
  imports: {
    'ember-concurrency': ['task', 'taskGroup']
  }
}

This configuration will transform all usages of the task and taskGroup exports from the ember-concurrency modules.

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-transform-class-property-assignment-to-decorator

Weekly Downloads

7

Version

0.1.1

License

ISC

Unpacked Size

5.66 kB

Total Files

5

Last publish

Collaborators

  • buschtoens