You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a Vue SFC with <script lang="ts" setup>
Create a ref/computed inside the setup.
Define some slots with defineSlots
Try to create a
What is expected?
Refs/Computed should be allowed as slotNames
What is actually happening?
You get a typescript error telling you that ComputedRef can not be used as indexer.
Strangely enough if I wrap the ref in a reactive and reference it as a field it works totally fine.
Vue version
3.3
Link to minimal reproduction
https://play.vuejs.org/#eNqNUs1ugzAMfhUrlzKpalX1VlGkbephO3RTu2MuCAyjgwQlputU8e5zgqAcWLUb9vfjL8ZX8VjXi3ODYiNCm5iiJihjlW+lICsFWKSmjqQqqlobgisYzOaQ6KpuCNM5l3FCxRmhhczoCmZsNZNKqhSzQuGx1GTDq1QAhJY2EDzANoJY/cz73mrUlKqNggcnT7SyBJbHlnjADLZucDBzghnElhMwzsyO1+fpmH0VdL5etJpQWQ63jyu03r17R+CzDnN9ypE7B2R5uOw2xXvhgpDJMSFXAKEzhY1iW17h4CNFxCKGJkhj+xFtwq3Pu/iX743+x4RwOUQXc/7dvJWsyBcnqxVfg19El64o0bzVVPDWpNiARxwWl6X+fvU9Mg36ZXnNJyZfE/2TvbieFO8GLZozSjFgFJscqYN3xz1e+HsAK502JbPvgAe0umxcxo721KiUY494Pu2Lv+NC5R92dyFUtn+UC+qYredLwXf8fOfpt7jrxdrr+DRE+wvpRh5J
Steps to reproduce
Create a Vue SFC with <script lang="ts" setup>
Create a ref/computed inside the setup.
Define some slots with defineSlots
Try to create a
What is expected?
Refs/Computed should be allowed as slotNames
What is actually happening?
You get a typescript error telling you that ComputedRef can not be used as indexer.
Strangely enough if I wrap the ref in a reactive and reference it as a field it works totally fine.
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: