Type error when binding props with a slot defined with defineSlots
Vue version
3.3.4
Link to minimal reproduction
Steps to reproduce
Try to bind a prop to a typed slot
<template>
<slot :value="test"></slot>
</template>
<script lang="ts" setup generic="T">
const props = defineProps<{ test: T }>()
const slots = defineSlots<{ default: (props: { value: T }) => any }>();
</script>
What is expected?
Test should have the type T
What is actually happening?
Type is incompatible with the slot argument
System Info
System:
OS: Windows 10 10.0.22621
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 11.72 GB / 31.92 GB
Binaries:
Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
pnpm: 6.19.1 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Chrome: 117.0.5938.88
Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.31)
Internet Explorer: 11.0.22621.1
npmPackages:
vue: ^3.0.0 => 3.3.4
Any additional comments?
No response
Relate issue https://github.com/vuejs/core/issues/9277