- defineEmits<EE>(emitOptions): EmitFn<EE[]>
- Type Parameters- EE extends string = string
 
- defineEmits<E>(emitOptions): EmitFn<E>
- defineEmits<T>(): T extends ((...args: any[]) => any)
 ? T
 : ShortEmits<T>
- Returns T extends ((...args: any[]) => any)
 ? T
 : ShortEmits<T>
Vue
<script setup>compiler macro for declaring a component's emitted events. The expected argument is the same as the componentemitsoption.Example runtime declaration:
Example type-based declaration:
This is only usable inside
<script setup>, is compiled away in the output and should not be actually called at runtime.