Vue3 + Vite + Typescript: Scoped slots type error

Viewed 2352

I have project with following devstack (Vue3, Vite, TypeScript) and I'm getting a following error on v-slot:

Element implicitly has an 'any' type because expression of type '"default"' can't be used to index type '{} | {}'.
  Property 'default' does not exist on type '{} | {}'.ts(7053)
<DataWrapper v-slot="{ values }">
  data: {{ values }}
</DataWrapper>

DataWrapper component injects props to the slot like this

...
<slot :values="data"></slot>
...

It does compile and works as expected but the error is still there. Any idea how to solve this? Thanks a million.

1 Answers
Related