Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve TS7022 error in Vue Composition API

Im getting this error when i try to import a component in my file:

TS7022: 'default' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
Version: typescript 4.2.2, eslint 7.32.0

Here is my script tag:

<script lang="ts">
import { defineComponent } from '@vue/composition-api'
import OrdersTable from 'src/components/OrdersTable.vue';

export default defineComponent({
  components: { OrdersTable }
})
</script>
like image 269
Igoohd Avatar asked Nov 06 '25 19:11

Igoohd


1 Answers

It could mean that you have a looped imports your components. Check dependencies of OrdersTable (all nested imports) that it does not have a import of this component

like image 170
Evgeny Sitchikhin Avatar answered Nov 09 '25 10:11

Evgeny Sitchikhin