Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.8k
Labels
Description
https://github.com/xiaoxiangmoe/issue-vue-2.7-on-click-type-error.git
pnpm run type-check
src/App.vue:12:6 - error TS2559: Type '{ onClick: any; }' has no properties in common with type 'Readonly<Partial<{}> & Omit<Readonly<ExtractPropTypes<{ border: { type: PropType<boolean>; }; }>>, never>>'.12 <HelloWorld @click="handleClick" /> ~~~~~~~~~~Found 1 error in src/App.vue:12
HelloWorld.vue
<script setup lang="ts">interfaceButtonProps { border?:boolean;}const props=defineProps<ButtonProps>()defineEmits<{ (event:'click',payload:MouseEvent):void}>()</script><template> <divid="app"> <button@click="$emit('click', $event)">Click me</button> </div></template>
This error come since vue-tsc 1.7.12