Igoohd
Igoohd

Reputation: 166

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>

Upvotes: 4

Views: 1519

Answers (1)

Evgeny Sitchikhin
Evgeny Sitchikhin

Reputation: 41

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

Upvotes: 3

Related Questions