Vue3 / typescript accessing properties
Solution 1:
To enable type inference in components, use the defineComponent
wrapper around the component declaration:
<script lang="ts">
import { defineComponent } from 'vue'
š
export default defineComponent({
created() {
// š” type inference enabled
}
})
</script>