Page MenuHomePhabricator

Declare all events emitted in the Vue components
Closed, ResolvedPublicBUG REPORT

Description

Description

In Vue 3 with the Options API, you can declare events emitted by a component using the emits option. This helps with type checking and better tooling support.

export default {
  name: 'WlComponent',
  emits: ['my-event'],
  methods: {
    emitEvent() {
      this.$emit('my-event', 'some data');
    }
  }
}

This is already done in the visualeditor integration components (see example) but not in the Wikifunctions UI components.

Expected behavior (Acceptance criteria):

  • All emitted events are declared in their respective components.

Completion checklist

Event Timeline

gengh updated the task description. (Show Details)
gengh renamed this task from Fixits Vue: declare all events emitted in the components to Declare all events emitted in the Vue components.Jul 2 2025, 2:47 PM

Change #1211702 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] Declare all events emitted in the Vue components

https://gerrit.wikimedia.org/r/1211702

DSmit-WMF changed the task status from Open to In Progress.Wed, Nov 26, 3:13 PM
DSmit-WMF claimed this task.

Change #1211702 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Declare all events emitted in the Vue components

https://gerrit.wikimedia.org/r/1211702