https://github.com/buschtoens/babel-plugin-transform-class-property-assignment-to-decorator
Transforms a class property assignment to a decorated class property.
https://github.com/buschtoens/babel-plugin-transform-class-property-assignment-to-decorator
Last synced: 6 months ago
JSON representation
Transforms a class property assignment to a decorated class property.
- Host: GitHub
- URL: https://github.com/buschtoens/babel-plugin-transform-class-property-assignment-to-decorator
- Owner: buschtoens
- License: isc
- Created: 2019-06-12T09:17:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:28:53.000Z (almost 2 years ago)
- Last Synced: 2024-10-09T12:42:44.943Z (about 1 year ago)
- Language: JavaScript
- Size: 89.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-transform-class-property-assignment-to-decorator
Transforms a class property assignment to a decorated class property.
```js
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:```js
{
imports: {
'ember-concurrency': ['task', 'taskGroup']
}
}
```This configuration will transform all usages of the `task` and `taskGroup`
exports from the `ember-concurrency` modules.