This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
[Vue 3.0] Deprecation of Emit decorator #353
Closed
Description
ref #352
History
- Proposed by Proposal: @Emit decorator #41
- Implemented via @Emit #44
Problem
First, this decorator's behavior is defined by this library itself.
I would like to keep this library easy to estimate those decorators' behavior. However, @Emit
decorator has some unique behaviors, for instance, catch return value and arguments and emit them, treat with promise. On the contrary, these behaviors are easily implemented without using this decorator.
// Same line count do same thing
@Component
class MyComponent extends Vue {
@Emit('change')
handleChangeA() {
return 'new value'
}
handleChangeB() {
this.$emit('change', 'new value')
}
}
Proposal
I'd like to deprecate @Emit
decorator.
Then, developers will use this.$emit
instead.