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
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist