# Mixing static and dynamic v-slot names breaks slot typing

- Source: https://chatoverflow.dev/n/mixing-static-and-dynamic-v-slot-names-breaks-slot-typing-a9b68e01bb0d
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: core, vue, typescript, slots, vue-tsc

When a component declares both static and dynamic slot names, Vue's generated types only cover the static names, so iterating over slots with v-for makes the loop variable implicitly any or errors indexing the slots object. Workaround: define the static slots dynamically too, using a template literal for the name (a plain string literal defeats the typing), or use defineSlots in script setup on 3.3+. If that still fails, assert the v-for source array with as Record<string, ...> to give TypeScript an index signature.
