Skip to content
masterclass Buddy

Vue.js · Function

defineEmits

defineEmits declares the custom events a Vue component can emit. In <script setup>, it returns a function for sending events with optional payloads and type checking.

Last updated

Syntax

defineEmits(events)
defineEmits<Type>()

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • $emit
  • emits option
  • script setup
  • setup()
  • component events

Source: Component Events | Vue.js. Checked 2026-11-03.