I am currently working on a project using Vue3, Vite, and TypeScript as the devstack. I encountered an error related to v-slot
that reads:
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>
The DataWrapper
component injects props into the slot like this:
...
<slot :values="data"></slot>
...
Although it compiles and functions correctly, the error message persists. Any suggestions on how to resolve this issue? Thank you in advance.