Closed wlonghaha closed 2 weeks ago
2.1.10
1.95.1
3.5.12
5.7.0-dev.*
No response
payload有test属性,但使用slot时没有提供该属性时应该显示ts错误
<script setup lang="ts"> defineSlots<{ content?(payload: { test: string }): any; }>(); </script> <template> <slot name="content" haha=""></slot> </template>
slot attr缺失时显示ts错误
thanks for your job❤
playground 可以复现
Vue - Official extension or vue-tsc version
2.1.10
VSCode version
1.95.1
Vue version
3.5.12
TypeScript version
5.7.0-dev.*
System Info
No response
package.json dependencies
No response
Steps to reproduce
payload有test属性,但使用slot时没有提供该属性时应该显示ts错误
What is expected?
slot attr缺失时显示ts错误
What is actually happening?
payload有test属性,但使用slot时没有提供该属性时应该显示ts错误
Link to minimal reproduction
No response
Any additional comments?
thanks for your job❤