<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { CustomerContext, getCustomerRepository } from '@/composables/customerRepository'
@Component
export default class CustomerList extends Vue {
search = ''
setup(): CustomerContext {
const ctx = getCustomerRepository()
return ctx
}
}
</script>
Exploring the use of the Composition API in Vue 2 with TypeScript and class component style. Unsure if the syntax is correct and encountering issues where the setup()
function is not automatically invoked.
Questioning if vue-class-component
can be used effectively with the Composition API in TypeScript.