Complete the code to define an emit event named 'update' in a Vue component.
const emit = defineEmits<{ [1]: (value: string) => void }>()The emit event name must be exactly "update" to match the event we want to type.
Complete the code to type an emit event 'submit' that sends a number payload.
const emit = defineEmits<{ [1]: (id: number) => void }>()The event name must be "submit" to match the typed emit event that sends a number.
Fix the error in typing the emit event 'close' that sends no payload.
const emit = defineEmits<{ [1]: () => void }>()The event name must be "close" to correctly type the emit event with no payload.
Fill both blanks to type emits 'change' with a string payload and 'delete' with a number payload.
const emit = defineEmits<{ [1]: (value: string) => void; [2]: (id: number) => void }>()Use "change" for the string payload event and "delete" for the number payload event.
Fill all three blanks to type emits: 'input' with a string, 'submit' with a number, and 'cancel' with no payload.
const emit = defineEmits<{ [1]: (text: string) => void; [2]: (id: number) => void; [3]: () => void }>()Use "input" for the string payload, "submit" for the number payload, and "cancel" for no payload.