Slots — typed slot props.
Child component:
1<template>2 <slot :item="item" :count="count"></slot>3</template>45<script setup lang="ts">6interface Item {7 id: number8 name: string9}1011const item: Item = { id: 1, name: "Item" }12const count = 1013</script>
Parent usage:
1<template>2 <Child v-slot="{ item, count }">3 {{ item.name }} - {{ count }}4 </Child>5</template>67<script setup lang="ts">8interface SlotProps {9 item: { id: number; name: string }10 count: number11}1213// Type slot in child14defineSlots<{15 default: (props: SlotProps) => unknown16}>()17</script>