I was creating a component that wraps a QInput, which passes everything down to it, but vue-tsc is complaining of the following:
TS7053: Element implicitly has an 'any' type because expression of type 'string | number' can't be used to index type '{ default: unknown; prepend: unknown; append: unknown; before: unknown; after: unknown; label: unknown; error: unknown; hint: unknown; counter: unknown; loading: unknown; }'.
No index signature with a parameter of type 'string' was found on type '{ default: unknown; prepend: unknown; append: unknown; before: unknown; after: unknown; label: unknown; error: unknown; hint: unknown; counter: unknown; loading: unknown; }'.
14 v-slot:[slot]="scope"
~~~~~~
Component code:
<q-input
borderless
v-bind="$attrs"
:model-value="props.modelValue"
>
<template
v-for="(_, slot) in $slots"
v-slot:[slot]="scope"
>
<slot
:name="slot"
v-bind="scope || {}"
/>
</template>
</q-input>
I was wondering if there is a workaround on this