Skip to content
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
@kaorun343

Description

@kaorun343

ref #352

History

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions