-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Labels
❗ p4-importantPriority 4: this fixes bugs that violate documented behavior, or significantly improves perf.Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.scope: compilerscope: script-setup
Description
Vue version
3.3.4
Link to minimal reproduction
https://github.com/tragid/vue-default-export-error/tree/vue-3.3.4-emit-errors
Steps to reproduce
- Create BaseEmits type:
export interface BaseEmits {
(e: 'input-event', value: string): void;
(e: 'change-event', value: string): void;
}
- Create component and defineEmits with extending BaseEmits
interface ComponentEmits extends BaseEmits {
(e: 'blur-event', value: string): void;
(e: 'focus-event', value: string): void;
}
const emit = defineEmits();
- Facing runtime exceptions on DEV and not setup extended emits on prod:
runtime-core.esm-bundler.js:41 [Vue warn]: Component emitted event "input-event" but it is neither declared in the emits option nor as an "onInput-event" prop.
runtime-core.esm-bundler.js:41 [Vue warn]: Component emitted event "change-event" but it is neither declared in the emits option nor as an "onChange-event" prop.
What is expected?
defineEmits can support extended events
What is actually happening?
Facing runtime exceptions on DEV and not setup extended emits on prod:
runtime-core.esm-bundler.js:41 [Vue warn]: Component emitted event "input-event" but it is neither declared in the emits option nor as an "onInput-event" prop.
runtime-core.esm-bundler.js:41 [Vue warn]: Component emitted event "change-event" but it is neither declared in the emits option nor as an "onChange-event" prop.
System Info
No response
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
❗ p4-importantPriority 4: this fixes bugs that violate documented behavior, or significantly improves perf.Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.scope: compilerscope: script-setup