adopted-ember-addons / adopted-ember-addons/ember-metrics
Feature idea: supply a decorator API?
- 主要言語
- TypeScript
- スター
- 367
- フォーク
- 158
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
This is obviously a bit out before we could land it, but as I was looking at the current (really solid) API it occurred to me that class method decorators (after ES6-style classes land… 🤞) could make for a really nice API:
```js
import { trackEvent } from 'ember-metrics';
class Foo extends Component {
@service metrics;
@trackEvent('some-action-yeah')
someMethodWhichShouldTriggerAnAction() {
// ...
}
}
```
That's obviously a very rough idea, and obviously it's quite a ways before we could land it, but I figured I'd throw it out as something to start thinking through – including even whether it's a good idea – ahead of time.
コントリビューションガイド
評価
この issue はまだ評価されていません。