After creating a Vue SFC component, I want to make sure that the event handleClose is defined. Here is the current sample code:
// Component.vue
const emit = defineEmits<{
(e: "handleClose"): void;
}>();
type Props = { isOpen: boolean };
defineProps<Props>();
When trying to use <Component />
, an error occurs due to the missing prop isOpen
, but there is no complaint about the absence of @handle-close
.
I am looking for a way to enforce this check and display a warning if @handle-close
is not defined.