You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
event listeners should consider camelCase emits #651
Ran into this as well. This means that when using the defineModel macro, where the event emitted is in camel case (update:modelValue), the devtools give a "Not declared" warning, even though the update event triggers and functions normally.
If the component specifies defineEmits(['update:model-value']), i.e. explicit kebab-case, the event listener is considered Declared. But it seems a bit much to add that to all components in the code just to get rid of the warning in the devtools. It's one of the two parts that defineModel does, so also redundant to specify that.
After a (quick) look in the repo code, it seems it's partly handled in process.ts, processEventListeners function. Couldn't spend more time to find out more about the instance.type.emits. The type could come from here, but no obvious emits there. It probably happens somewhere else. Could come from the any type App in the same file.
Activity
yourock1988 commentedon Mar 5, 2025
same issue
razofz commentedon Nov 20, 2025
Ran into this as well. This means that when using the
defineModelmacro, where the event emitted is in camel case (update:modelValue), the devtools give a "Not declared" warning, even though the update event triggers and functions normally.If the component specifies
defineEmits(['update:model-value']), i.e. explicit kebab-case, the event listener is considered Declared. But it seems a bit much to add that to all components in the code just to get rid of the warning in the devtools. It's one of the two parts that defineModel does, so also redundant to specify that.After a (quick) look in the repo code, it seems it's partly handled in
process.ts,processEventListenersfunction. Couldn't spend more time to find out more about theinstance.type.emits. Thetypecould come from here, but no obvious emits there. It probably happens somewhere else. Could come from theanytype App in the same file.